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" />