Apk Build Failure
-
21:42:53: 进程"C:\Users\sf\AppData\Local\Android\Sdk\ndk\21.3.6528147\prebuilt\windows-x86_64\bin\make.exe"正常退出。 21:42:53: Removing directory C:\Users\sf\Documents\code\qt\test\build-test-Android_Qt_5_15_2_Clang_Multi_Abi-Debug\android-build/libs 21:42:53: 正在启动 "C:\Users\sf\AppData\Local\Android\Sdk\ndk\21.3.6528147\prebuilt\windows-x86_64\bin\make.exe" "INSTALL_ROOT=C:\Users\sf\Documents\code\qt\test\build-test-Android_Qt_5_15_2_Clang_Multi_Abi-Debug\android-build" install C:\Qt\5.15.2\android\bin\qmake.exe -install qinstall -exe libtest_armeabi-v7a.so C:\Users\sf\Documents\code\qt\test\build-test-Android_Qt_5_15_2_Clang_Multi_Abi-Debug\android-build\libs\armeabi-v7a\libtest_armeabi-v7a.so 21:42:53: 进程"C:\Users\sf\AppData\Local\Android\Sdk\ndk\21.3.6528147\prebuilt\windows-x86_64\bin\make.exe"正常退出。 21:42:53: Starting: "C:\Qt\5.15.2\android\bin\androiddeployqt.exe" --input C:/Users/sf/Documents/code/qt/test/build-test-Android_Qt_5_15_2_Clang_Multi_Abi-Debug/android-test-deployment-settings.json --output C:/Users/sf/Documents/code/qt/test/build-test-Android_Qt_5_15_2_Clang_Multi_Abi-Debug/android-build --android-platform android-23 --jdk "C:/Program Files/Java/jdk1.8.0_271" --gradle Generating Android Package Input file: C:/Users/sf/Documents/code/qt/test/build-test-Android_Qt_5_15_2_Clang_Multi_Abi-Debug/android-test-deployment-settings.json Output directory: C:/Users/sf/Documents/code/qt/test/build-test-Android_Qt_5_15_2_Clang_Multi_Abi-Debug/android-build/ Application binary: test Android build platform: android-23 Install to device: No -- Skipping C:/Qt/5.15.2/android/plugins/iconengines/libplugins_iconengines_qsvgicon_armeabi-v7a.so. It has unmet dependencies: lib/libQt5Svg_armeabi-v7a.so. -- Skipping C:/Qt/5.15.2/android/plugins/imageformats/libplugins_imageformats_qsvg_armeabi-v7a.so. It has unmet dependencies: lib/libQt5Svg_armeabi-v7a.so. Skipping createRCC > Task :preBuild UP-TO-DATE > Task :preDebugBuild UP-TO-DATE > Task :compileDebugAidl UP-TO-DATE > Task :compileDebugRenderscript NO-SOURCE > Task :generateDebugBuildConfig UP-TO-DATE > Task :javaPreCompileDebug UP-TO-DATE > Task :mainApkListPersistenceDebug UP-TO-DATE > Task :generateDebugResValues UP-TO-DATE > Task :generateDebugResources UP-TO-DATE > Task :mergeDebugResources UP-TO-DATE > Task :createDebugCompatibleScreenManifests UP-TO-DATE > Task :extractDeepLinksDebug UP-TO-DATE > Task :processDebugManifest UP-TO-DATE > Task :processDebugResources FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':processDebugResources'. > A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade > Android resource linking failed C:\Users\sf\Documents\code\qt\test\build-test-Android_Qt_5_15_2_Clang_Multi_Abi-Debug\android-build\AndroidManifest.xml:14:9-79:16: AAPT: error: 'orientation|uiMode|screenLayout|screenSize|smallestScreenSize|layoutDirection|locale|fontScale|keyboard|keyboardHidden|navigation|mcc|mnc|density' is incompatible with attribute configChanges (attr) flags [locale=4, fontScale=1073741824, keyboard=16, keyboardHidden=32, layoutDirection=8192, mcc=1, mnc=2, navigation=64, orientation=128, screenLayout=256, screenSize=1024, smallestScreenSize=2048, touchscreen=8, uiMode=512]. * Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights. * Get more help at https://help.gradle.org BUILD FAILED in 896ms 10 actionable tasks: 1 executed, 9 up-to-date Building the android package failed! -- For more information, run this command with --verbose. 21:42:55: 进程"C:\Qt\5.15.2\android\bin\androiddeployqt.exe"退出,退出代码 14 。 Error while building/deploying project test (kit: Android Qt 5.15.2 Clang Multi-Abi) When executing step "Build Android APK" 21:42:55: Elapsed time: 00:02.
I am a newbie and don't know how to solve this problem. Can you provide me with a solution?
-
I have the same problem. This framework have one or much problems each times. I need help.
-
Hi,
I had the exact same problem when trying to compile for API level 23. Above API levels could compile without this error on my setup.
I found the solution by comparing the template files that are generated with the latest NDK 21 and QT 5.12 and my previous working project files with my previous setup of NDK 16 and QT 5.11.
It seems that the following is generated in AndroidManifext.xml when you select for Android build SDK "android-23" and is causing this error:android:configChanges="orientation|uiMode|screenLayout|screenSize|smallestScreenSize|layoutDirection|locale|fontScale|keyboard|keyboardHidden|navigation|mcc|mnc|density"
Whereas when you remove (as it was on my previous working setup files)
|mcc|mnc|density
from the new AndroidManifest.xml and rebuild for Android target you should be able to have a succesful build for API level 23 and the error will be gone.
-
I solved this problem. I was delete the android folder and remake this folder with the CREATE TEMPLATE button from Project->Multi-Api->Build APK section. The problem is because a deprecated xml file of the other API, for example android/res/.xml or android/libs/.xml. The CREATE TEMPLATES button make a correct android folder. I was copy only the icons folder into the folder android/res of my previus compilers and when i pressed the compiles button all running correct.
PD: Into the Build Apk section i was checked the BUILD BUNDLE .AAB FILE and OPEN THE FOLDER BUILD. This bundle file is aceptted for the Google Play Store with the valid ABIS too checked in the QMAKE/CMAKE compiler options. All running very good!!.