Apk Build Failure
Solved
Installation and Deployment
-
I am using Qt 5.12.3 (also have tried 5.7.0, 5.11.1 and 5.13.0). I am able to successfully build this (Weather app, but I am unable to build any other app for Android for the Qt built-in examples. Please help me with this.
the following error appears.Generating Android Package Input file: C:/Users/Ahsan/Documents/QT Projects/bQMessageBox/android-libQMessageBox.so-deployment-settings.json Output directory: C:/Users/Ahsan/Documents/QT Projects/bQMessageBox/android-build/ Application binary: C:/Users/Ahsan/Documents/QT Projects/bQMessageBox/libQMessageBox.so Android build platform: android-27 Install to device: No -- Skipping C:/Q/Qt5124/5.12.4/android_armv7/plugins/iconengines/libqsvgicon.so. It has unmet dependencies: lib/libQt5Svg.so. -- Skipping C:/Q/Qt5124/5.12.4/android_armv7/plugins/imageformats/libqsvg.so. It has unmet dependencies: lib/libQt5Svg.so. :checkDebugClasspath UP-TO-DATE :preBuild UP-TO-DATE :preDebugBuild UP-TO-DATE :compileDebugAidl FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':compileDebugAidl'. > java.io.IOException: com.android.ide.common.process.ProcessException: Error while executing process C:\Android\sdk\build-tools\29.0.0\aidl.exe with arguments {-pC:\Android\sdk\platforms\android-27\framework.aidl -oC:\Users\Ahsan\Documents\QT Projects\bQMessageBox\android-build\build\generated\source\aidl\debug -IC:\Users\Ahsan\Documents\QT Projects\bQMessageBox\android-build\src -IC:\Q\Qt5124\5.12.4\android_armv7\src\android\java\src -IC:\Users\Ahsan\Documents\QT Projects\bQMessageBox\android-build\aidl -IC:\Users\Ahsan\Documents\QT Projects\bQMessageBox\android-build\src\debug\aidl -dC:\Users\Ahsan\AppData\Local\Temp\aidl1036612422597530989.d C:\Q\Qt5124\5.12.4\android_armv7\src\android\java\src\org\kde\necessitas\ministro\IMinistro.aidl} * 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 17s 3 actionable tasks: 1 executed, 2 up-to-date Building the android package failed! -- For more information, run this command with --verbose. 15:23:37: The process "C:\Q\Qt5124\5.12.4\android_armv7\bin\androiddeployqt.exe" exited with code 14. Error while building/deploying project QMessageBox (kit: Android for armeabi-v7a (Clang Qt 5.12.4 for Android ARMv7)) When executing step "Build Android APK" 15:23:37: Elapsed time: 00:25.
-
This is a bug of Android SDK Platform Tools 29.0.0.
The solution is to downgrade the build forcing to use v. 28.0.3.locate the file on your build directory, mine is:
C:\dev_qt\experiments\build-test_qt_5_13_0_ARMv7-Release\android-build\gradle.properties
and change
from:androidBuildToolsVersion=29.0.0
to:androidBuildToolsVersion=28.0.3
Ensure to have Android SDK Platform Tools 28.0.3
Check in Android studio->Tools->SDK Manager->SDK Tools->Flag 'Show package details'