Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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:

  • Development host: win10 x64
  • andorid comile plattforms: 23, 26, 27, 28
  • andorid ndk version: r19c, r18b
  • java version: 1.8.0_201

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...

like image 592
Patrick Avatar asked Oct 27 '22 16:10

Patrick


1 Answers

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'

like image 59
Albertino80 Avatar answered Nov 15 '22 06:11

Albertino80