Error processing android aidl with Qt5.15.11
-
Hello,
I have Qt6.4 and Qt5.15.11 both installed on my windows,
and I got following error on executing aidl file from Qt5.15.11(textfinder example project), is it because 5.15.11 is incompatible with build-tools 33.0.0?Execution failed for task ':compileDebugAidl'.
A failure occurred while executing com.android.build.gradle.tasks.AidlCompile$AidlCompileRunnable
com.android.ide.common.process.ProcessException: Error while executing process C:\Users\leonz\AppData\Local\Android\Sdk\build-tools\33.0.0\aidl.exe with arguments {-pC:\Users\leonz\AppData\Local\Android\Sdk\platforms\android-33\framework.aidl -oE:\ProgramFiles\Qt\Examples\Qt-5.15.11\uitools\build-textfinder-Android_Qt_5_15_11_Clang_Multi_Abi-Debug\android-build\build\generated\aidl_source_output_dir\debug\out -IE:\ProgramFiles\Qt\5.15.11\android\src\android\java\src -IE:\ProgramFiles\Qt\Examples\Qt-5.15.11\uitools\build-textfinder-Android_Qt_5_15_11_Clang_Multi_Abi-Debug\android-build\src -IE:\ProgramFiles\Qt\Examples\Qt-5.15.11\uitools\build-textfinder-Android_Qt_5_15_11_Clang_Multi_Abi-Debug\android-build\aidl -IE:\ProgramFiles\Qt\Examples\Qt-5.15.11\uitools\build-textfinder-Android_Qt_5_15_11_Clang_Multi_Abi-Debug\android-build\src\debug\aidl -dC:\Users\leonz\AppData\Local\Temp\aidl6002054530545793634.d E:\ProgramFiles\Qt\5.15.11\android\src\android\java\src\org\kde\necessitas\ministro\IMinistro.aidl}while I can build Qt6.4 for android configuration with no problem.
If it is because incompatible with build-tools, how I can set use specific build-tools version in Qt Creator?Thanks
-
You can create a gradle.properties file inside your android directory and add:
androidBuildToolsVersion=31.0.0It's also possible to change it directly in build.gradle:
android { ... compileSdkVersion androidCompileSdkVersion.toInteger() buildToolsVersion "31.0.0" ... } -
You can create a gradle.properties file inside your android directory and add:
androidBuildToolsVersion=31.0.0It's also possible to change it directly in build.gradle:
android { ... compileSdkVersion androidCompileSdkVersion.toInteger() buildToolsVersion "31.0.0" ... }@Jens-Christensen Thanks for reply. I am using Qt creator and the project is in pro file, so there is no build.gradle file. How to add gradle.properties file to pro project?
-
@Jens-Christensen Thanks for reply. I am using Qt creator and the project is in pro file, so there is no build.gradle file. How to add gradle.properties file to pro project?
@Leon-Zhang These files are generated automatically for your project by qt creator under dir android where AndroidManifest.xml is located.