Product type is not an application, not building an APK.
-
Please post text as text instead of unreadable screenshots
-
QT 6.9.2 ndk 26, SDK 33/34
Error message:Product type is not an application, not building an APK.!(https://ddgobkiprc33d.cloudfront.net/c7957be4-58a2-4e74-811b-c638a264dbcf.png)
cmake_minimum_required(VERSION 3.16)
project(PhotoStdAesthetic VERSION 0.1 LANGUAGES CXX)
set(CMAKE_CXX_STANDARD 17)
set(CMAKE_CXX_STANDARD_REQUIRED ON)set(CMAKE_AUTOMOC ON)
set(CMAKE_AUTORCC ON)
set(CMAKE_AUTOUIC ON)
set(CMAKE_INCLUDE_CURRENT_DIR ON)Qt paketleri (Sql'i açtım, gerekirse yorumla)
find_package(Qt6 6.9 REQUIRED COMPONENTS Core Gui Quick Multimedia QuickControls2)
qt_standard_project_setup(REQUIRES 6.5)
Ana executable / shared library
if(ANDROID)
add_library(appphotostdaesthetic SHARED
main.cpp
src/Camera/CameraHandler.cpp
src/Camera/CameraHandler.h
src/Share/ShareUtils.cpp
src/Share/ShareUtils.h
src/UserModel/UserModel.cpp
src/UserModel/UserModel.h
src/GalleryModel/GalleryModel.cpp
src/GalleryModel/GalleryModel.h
)
else()
qt_add_executable(appphotostdaesthetic
main.cpp
src/Camera/CameraHandler.cpp
src/Camera/CameraHandler.h
src/Share/ShareUtils.cpp
src/Share/ShareUtils.h
src/UserModel/UserModel.cpp
src/UserModel/UserModel.h
src/GalleryModel/GalleryModel.cpp
src/GalleryModel/GalleryModel.h
)
endif()QML policy (QTP0004 uyarısını kapatmak için)
qt_policy(SET QTP0004 NEW)
qt_add_qml_module(appappphotostdaesthetic
URI appphotostdaesthetic
VERSION 1.0
QML_FILES
Main.qml
qml/Pages/PageUserPro.qml
qml/Pages/homePage.qml
qml/Pages/CamPageNose.qml
qml/Pages/PageGallery.qml
qml/Pages/PageViewer.qml
qml/Pages/PageRegister.qml
qml/Components/ButtonCustom.qml
qml/Components/DelegateThumbnail.qml
qml/Components/ItemUserPro.qml
RESOURCES
assets/images/home_grid1.png
assets/images/home_grid2.png
assets/images/home_grid3.png
assets/images/home_grid4.png
OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/appphotostdaesthetic")
Android ayarları
if(ANDROID)
# Android deploy dizini ve hedef ABIs
set_target_properties(appphotostdaesthetic PROPERTIES
QT_ANDROID_PACKAGE_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/android"
QT_ANDROID_ABIS "arm64-v8a"
QT_ANDROID_PACKAGE_NAME "com.photostdaesthetic.app"
QT_ANDROID_TARGET_SDK_VERSION 34) # Plugin import: Debug ve Release için ayrı ayrı veya ortak qt_import_plugins(appphotostdaesthetic INCLUDE_BY_TYPE imageformats EXCLUDE_BY_TYPE qmltooling EXCLUDE_BY_TYPE iconengines EXCLUDE_BY_TYPE networkinformation EXCLUDE_BY_TYPE tls EXCLUDE_BY_TYPE platforminputcontexts ) # Deploy script oluştur ve yükle qt_generate_deploy_qml_app_script( TARGET appphotostdaesthetic OUTPUT_SCRIPT deploy_script NO_UNSUPPORTED_PLATFORM_ERROR DEPLOY_USER_QML_MODULES_ON_UNSUPPORTED_PLATFORM ) install(SCRIPT ${deploy_script})
endif()
Masaüstü ayarları
if(NOT ANDROID)
set_target_properties(appphotostdaesthetic PROPERTIES
MACOSX_BUNDLE_BUNDLE_VERSION ${PROJECT_VERSION}
MACOSX_BUNDLE_SHORT_VERSION_STRING ${PROJECT_VERSION_MAJOR}.${PROJECT_VERSION_MINOR}
MACOSX_BUNDLE TRUE
WIN32_EXECUTABLE TRUE
)
endif()Qt kütüphaneleri
target_link_libraries(appphotostdaesthetic
PRIVATE
Qt6::Core
Qt6::Gui
Qt6::Quick
Qt6::QuickControls2
Qt6::Multimedia
)Compile output:
10:01:23: Deploying to HA18BACD
10:01:23: Running steps for project PhotoStdAesthetic...
10:01:23: Starting: "C:\Qt\Tools\CMake_64\bin\cmake.exe" --build C:/ProjeP/PhotoStdAesthetic/build/Android_Qt_6_9_2_Clang_arm64_v8a-Release --target appappphotostdaesthetic
ninja: no work to do.
10:01:23: The command "C:\Qt\Tools\CMake_64\bin\cmake.exe --build C:/ProjeP/PhotoStdAesthetic/build/Android_Qt_6_9_2_Clang_arm64_v8a-Release --target appappphotostdaesthetic" finished successfully.
10:01:23: Product type is not an application, not building an APK.
10:01:23: Starting: "C:\Qt\6.9.2\mingw_64\bin\androiddeployqt.exe --verbose --output C:/ProjeP/PhotoStdAesthetic/build/Android_Qt_6_9_2_Clang_arm64_v8a-Release/android-build-appappphotostdaesthetic --no-build --input C:/ProjeP/PhotoStdAesthetic/build/Android_Qt_6_9_2_Clang_arm64_v8a-Release/android-appappphotostdaesthetic-deployment-settings.json --gradle --release --reinstall --device HA18BACD"
10:01:23: The process "C:\Qt\6.9.2\mingw_64\bin\androiddeployqt.exe" exited with code 255.
10:01:23: Installing the app failed with an unknown error.
10:01:23: Elapsed time: 00:00.Issues:
:-1: warning: Product type is not an application, not building an APK.
:-1: error: The process "C:\Qt\6.9.2\mingw_64\bin\androiddeployqt.exe" exited with code 255.
:-1: error: Installing the app failed with an unknown error.I have not soved the problem. Do you any idea about this problem?
Thanks in advance. -
13:05:09: The command "C:\Qt\Tools\CMake_64\bin\cmake.exe --build C:/ProjeP/PhotoStdAesthetic/build/Android_Qt_6_9_2_Clang_arm64_v8a-Debug --target appphotostdaesthetic" finished successfully.
13:05:09: Product type is not an application, not building an APK.
13:05:09: Starting: "C:\Qt\6.9.2\mingw_64\bin\androiddeployqt.exe --verbose --output C:/ProjeP/PhotoStdAesthetic/build/Android_Qt_6_9_2_Clang_arm64_v8a-Debug/android-build-appphotostdaesthetic --no-build --input C:/ProjeP/PhotoStdAesthetic/build/Android_Qt_6_9_2_Clang_arm64_v8a-Debug/android-appphotostdaesthetic-deployment-settings.json --gradle --reinstall --device HA18BACD"
13:05:09: The process "C:\Qt\6.9.2\mingw_64\bin\androiddeployqt.exe" exited with code 255.
13:05:09: Installing the app failed with an unknown error.
13:05:09: Elapsed time: 00:00. -
13:05:09: The command "C:\Qt\Tools\CMake_64\bin\cmake.exe --build C:/ProjeP/PhotoStdAesthetic/build/Android_Qt_6_9_2_Clang_arm64_v8a-Debug --target appphotostdaesthetic" finished successfully.
13:05:09: Product type is not an application, not building an APK.
13:05:09: Starting: "C:\Qt\6.9.2\mingw_64\bin\androiddeployqt.exe --verbose --output C:/ProjeP/PhotoStdAesthetic/build/Android_Qt_6_9_2_Clang_arm64_v8a-Debug/android-build-appphotostdaesthetic --no-build --input C:/ProjeP/PhotoStdAesthetic/build/Android_Qt_6_9_2_Clang_arm64_v8a-Debug/android-appphotostdaesthetic-deployment-settings.json --gradle --reinstall --device HA18BACD"
13:05:09: The process "C:\Qt\6.9.2\mingw_64\bin\androiddeployqt.exe" exited with code 255.
13:05:09: Installing the app failed with an unknown error.
13:05:09: Elapsed time: 00:00.@MT34 said in Product type is not an application, not building an APK.:
13:05:09: Product type is not an application, not building an APK.
I know nothing, but try see whether https://forum.qt.io/topic/162329/qtcreator-15-changing-android-application-name-breaks-build helps? Or general "delete what you have and have a go again from scratch"?
-
J jsulm referenced this topic