how to change API level ?
-
hi there im running an app using android 9 on my device but looks like compiler always take api level 35 that doesn't match with my current api level and generate this error:
FAILURE: Build failed with an exception.
- What went wrong:
Execution failed for task ':processDebugResources'.
A failure occurred while executing com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask$TaskAction
Android resource linking failed
aapt2 E 07-30 14:53:26 50028 50028 LoadedArsc.cpp:94] RES_TABLE_TYPE_TYPE entry offsets overlap actual entry data.
aapt2 E 07-30 14:53:26 50028 50028 ApkAssets.cpp:149] Failed to load resources table in APK '/home/machine/Android/Sdk/platforms/android-35-2/android.jar'.
error: failed to load include path /home/machine/Android/Sdk/platforms/android-35-2/android.jar.so... again... im using android-9 on my device idk why is trying to use android 35. android qt 6.7.0 java 17 open jdk and ndk 21.3.65... is there a way to change api level instead of android 35.
- What went wrong:
-
You’ll do that in the Android device settings in n Qt Creator’s preferences.
Here is a video tutorial. -
You need to uninstall android platform 35 from sdk manager. I struggled with it many times - for some reason during the build always the newest version from your SDK is taken, no matter what settings you have in the project.
-
Hi,
I have a similar problem as @0xNull wrote. Also want target platform to be Android 9, so API level 28, but am also getting build failures. I followed the video tutorial, but there I don´t see explained how you can build for a lower API level (unless I missed something).When I set Android build-tools version to 28.0 and Android build platform SDK to 28 and do a rebuild, I get e.g.
FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':checkDebugAarMetadata'. > A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction > 6 issues were found when checking AAR metadata: 1. Dependency 'androidx.core:core:1.13.1' requires libraries and applications that depend on it to compile against version 34 or later of the Android APIs. : is currently compiled against android-28. Also, the maximum recommended compile SDK version for Android Gradle plugin 7.4.1 is 33. ... ...
I also tried the suggestion written by @Erulission, but if I remove the highest SDK platform (34 in my case), the SDK manager complains that "Android SDK installation is missing necessary packages". However I have installed the SDK platform 28 (Android 9.0).
And according to this page: Qt 6.7 for Android page, the minimum allowed API level should be able to support 26.
-
Android is crazy man.... is crazy... look... i use Unreal Engine and it setups Android SDK too.. that was enought to take down Qt Android SDK configuration... i can not understand why Android has so many versions of versions, why don't they have some universal platform or something like that..
i have the table error too.. toggled off API 35.. but still Qt tries to use it..
i guess i will make a clean (another) Windows install and try again..