Can't build with Android 35

Hello,

As probably some others here, I need to update my app to use Android 35 on the store.
But when I set target-sdk-version=35, I have this error during the build :

Execution failed for task ‘:app:bundleReleaseResources’.

A failure occurred while executing com.android.build.gradle.internal.res.Aapt2ProcessResourcesRunnable
Android resource linking failed
ERROR:: AAPT: aapt2 E 07-03 06:10:30 51728 51728 LoadedArsc.cpp:96] RES_TABLE_TYPE_TYPE entry offsets overlap actual entry data.
aapt2 E 07-03 06:10:30 51728 51728 ApkAssets.cpp:149] Failed to load resources table in APK ‘/home/will/Android/Sdk/platforms/android-35/android.jar’.
error: failed to load include path /home/will/Android/Sdk/platforms/android-35/android.jar.

Any idea why this happens ? Everything is fine with version 34.

To target a newer Android version, you typically need to specify newer versions of Gradle and the Android Gradle plugin in your project.xml.

According to Android Gradle plugin release notes, Android 35 requires the Android Gradle Plugin (AGP) 8.6.0 or newer. And AGP 8.6.0 requires Gradle 8.7.

So it should be something like this in your project.xml, I think:

<config:android gradle-version="8.7" gradle-plugin="8.6.0" />

EDIT: For reference, the future Lime 8.3 update is currently targeting Android 35 and is using gradle-version 8.9 and gradle-plugin 8.7.3. I successfully compiled and ran an app on one of my Android devices with these settings.

1 Like

Thanks,

it worked with some modifications as the package name must be moved outside project.xml.
It impacts also some libraries, but at least I can compile.

Thanks again

I would like to know when the Lime8.3.0 version will be updated? My current SO file is very large and cannot be used with NDK26.1.10909125.