Patrick
Patrick

Reputation: 211

ProcessException occures in QtCreator while generating APK

I have an existing QtCreator project, which I want to run on Android. When I compile and run with a kit for windows everything works fine. But when compiling the application for Android, I always this error in the last step "Build Android APK".

Specs:

Error message:

: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:\dev\android\sdk-tools-windows-4333796\build-tools\29.0.0-rc1\aidl.exe with arguments {-pC:\dev\android\sdk-tools-windows-4333796\platforms\android-28\framework.aidl -oC:\workspace\projects\build-Proj-Android_for_armeabi_v7a_Clang_Qt_5_12_0_for_Android_ARMv72_765240-Debug\android-build\build\generated\source\aidl\debug -IC:\dev\Qt\5.12.0\android_armv7\src\android\java\src -IC:\workspace\projects\build-Proj-Android_for_armeabi_v7a_Clang_Qt_5_12_0_for_Android_ARMv72_765240-Debug\android-build\src -IC:\workspace\projects\build-Proj-Android_for_armeabi_v7a_Clang_Qt_5_12_0_for_Android_ARMv72_765240-Debug\android-build\aidl -IC:\workspace\projects\build-Proj-Android_for_armeabi_v7a_Clang_Qt_5_12_0_for_Android_ARMv72_765240-Debug\android-build\src\debug\aidl -dC:\Users\user1\AppData\Local\Temp\aidl8241234200511438554.d C:\dev\Qt\5.12.0\android_armv7\src\android\java\src\org\kde\necessitas\ministro\IMinistro.aidl}

Since I am able to reproduce this issue with a newly created project in QtCreator, there must be something wrong with my setup.

I am thankfull for every hint to solve this problem...

Upvotes: 5

Views: 725

Answers (2)

PPP
PPP

Reputation: 1870

I tried Albertino80's fix but it didnt work then I simply placed the build directory of my kit to something really small like C:\User\MyUser\build. I've read somewhere that really big names for the build folder give this error. Don't know if Albertino80's fix is still needed but I guess no since it built with the version 30 of the SDK.

Upvotes: 0

Albertino80
Albertino80

Reputation: 1093

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'

Upvotes: 2

Related Questions