A linking error when building the APK file of a QML app
-
I use Qt 5.12 on a Windows 7 X64 machine and below is the Devices on Qt Creator 4.8:
As it's shown, SDK, NDK and JDK seem to be fine.
Through this path, I went to create a simple QML project called "test_1":
File => New File or Project => Application (template) => Qt Quick Application - Empty => The project name (Test_1) => (Build System) qmake => Minimal Required Qt Version 5.12 => Kits (Android X86, Arm7 and Desktop) => Finish
And here's the code:
The SDK packages are also as follows:
Is there something faulty up to here?
Now testing the program using the kits:
Desktop: OK
Android X86 or Arm7 : FaildHere's all contents of the Compile Output window in the red colour:
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':processDebugResources'.
> Android resource linking failed Output: C:\Users\Abbasi\Desktop\Q_Apps\QML_Apps\Test_1\build-Test_1-Android_for_armeabi_v7a_Clang_Qt_5_12_0_for_Android_ARMv7-Debug\android-build\build\intermediates\merged_manifests\debug\processDebugManifest\merged\AndroidManifest.xml:39: 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].
error: failed processing manifest.
Command: C:\Users\Abbasi\.gradle\caches\transforms-1\files-1.1\aapt2-3.2.0-4818971-windows.jar\83adb1c826b3da76392f22b7ff050e9c\aapt2-3.2.0-4818971-windows\aapt2.exe link -I\ C:\Users\Abbasi\AppData\Local\Android\sdk\platforms\android-21\android.jar\ --manifest\ C:\Users\Abbasi\Desktop\Q_Apps\QML_Apps\Test_1\build-Test_1-Android_for_armeabi_v7a_Clang_Qt_5_12_0_for_Android_ARMv7-Debug\android-build\build\intermediates\merged_manifests\debug\processDebugManifest\merged\AndroidManifest.xml\ -o\ C:\Users\Abbasi\Desktop\Q_Apps\QML_Apps\Test_1\build-Test_1-Android_for_armeabi_v7a_Clang_Qt_5_12_0_for_Android_ARMv7-Debug\android-build\build\intermediates\processed_res\debug\processDebugResources\out\resources-debug.ap_\ -R\ @C:\Users\Abbasi\Desktop\Q_Apps\QML_Apps\Test_1\build-Test_1-Android_for_armeabi_v7a_Clang_Qt_5_12_0_for_Android_ARMv7-Debug\android-build\build\intermediates\incremental\processDebugResources\resources-list-for-resources-debug.ap_.txt\ --auto-add-overlay\ --java\ C:\Users\Abbasi\Desktop\Q_Apps\QML_Apps\Test_1\build-Test_1-Android_for_armeabi_v7a_Clang_Qt_5_12_0_for_Android_ARMv7-Debug\android-build\build\generated\not_namespaced_r_class_sources\debug\processDebugResources\r\ --custom-package\ org.qtproject.example.Test_1\ -0\ apk\ --no-version-vectors
Daemon: AAPT2 aapt2-3.2.0-4818971-windows Daemon #0
Output: C:\Users\Abbasi\Desktop\Q_Apps\QML_Apps\Test_1\build-Test_1-Android_for_armeabi_v7a_Clang_Qt_5_12_0_for_Android_ARMv7-Debug\android-build\build\intermediates\merged_manifests\debug\processDebugManifest\merged\AndroidManifest.xml:39: 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].
error: failed processing manifest.
Command: C:\Users\Abbasi\.gradle\caches\transforms-1\files-1.1\aapt2-3.2.0-4818971-windows.jar\83adb1c826b3da76392f22b7ff050e9c\aapt2-3.2.0-4818971-windows\aapt2.exe link -I\ C:\Users\Abbasi\AppData\Local\Android\sdk\platforms\android-21\android.jar\ --manifest\ C:\Users\Abbasi\Desktop\Q_Apps\QML_Apps\Test_1\build-Test_1-Android_for_armeabi_v7a_Clang_Qt_5_12_0_for_Android_ARMv7-Debug\android-build\build\intermediates\merged_manifests\debug\processDebugManifest\merged\AndroidManifest.xml\ -o\ C:\Users\Abbasi\Desktop\Q_Apps\QML_Apps\Test_1\build-Test_1-Android_for_armeabi_v7a_Clang_Qt_5_12_0_for_Android_ARMv7-Debug\android-build\build\intermediates\processed_res\debug\processDebugResources\out\resources-debug.ap_\ -R\ @C:\Users\Abbasi\Desktop\Q_Apps\QML_Apps\Test_1\build-Test_1-Android_for_armeabi_v7a_Clang_Qt_5_12_0_for_Android_ARMv7-Debug\android-build\build\intermediates\incremental\processDebugResources\resources-list-for-resources-debug.ap_.txt\ --auto-add-overlay\ --java\ C:\Users\Abbasi\Desktop\Q_Apps\QML_Apps\Test_1\build-Test_1-Android_for_armeabi_v7a_Clang_Qt_5_12_0_for_Android_ARMv7-Debug\android-build\build\generated\not_namespaced_r_class_sources\debug\processDebugResources\r\ --custom-package\ org.qtproject.example.Test_1\ -0\ apk\ --no-version-vectors
Daemon: AAPT2 aapt2-3.2.0-4818971-windows Daemon #0
* 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 7s 14 actionable tasks: 1 executed, 13 up-to-date Building the android package failed! -- For more information, run this command with --verbose. 13:40:16: The process "C:\Qt\5.12.0\android_armv7\bin\androiddeployqt.exe" exited with code 14. Error while building/deploying project Test_1 (kit: Android for armeabi-v7a (Clang Qt 5.12.0 for Android ARMv7)) When executing step "Build Android APK"
I even went for android-ndk-r17c-windows-x86_64.zip and replaced it with NDK r18b, but no changes in the result!
What is the problem please? Isn't that related to the path I created the project?
I think you, too, create Android apps using the Arm7 kit and building the application is part of its creation. So there must be some way to solve the problem. Agree?