Hi, Google recently warned developers to update their apps/games to target SDK 35 (Android 15), or else their apps may be removed from the Google Play Store.
When I tried building my game using Cocos Creator 3.7.4 with the Target API Level set to "android-35"
, the build process failed (in the make stage).
I also tried creating a new empty project with Cocos Creator 3.8.6, but it resulted in the same error. Here are the error logs:
2: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':TestProject:bundleReleaseResources'.
> A failure occurred while executing com.android.build.gradle.internal.res.Aapt2ProcessResourcesRunnable
> Android resource linking failed
aapt2.exe E 07-06 04:38:24 16452 4856 LoadedArsc.cpp:94] RES_TABLE_TYPE_TYPE entry offsets overlap actual entry data.
aapt2.exe E 07-06 04:38:24 16452 4856 ApkAssets.cpp:152] Failed to load resources table in APK 'C:\Users\Morteza\AppData\Local\Android\Sdk\platforms\android-35\android.jar'.
error: failed to load include path C:\Users\Morteza\AppData\Local\Android\Sdk\platforms\android-35\android.jar.
I’m using JDK 17.0.15+6
and NDK version 23.2.8568313
.
I also tried using a newer version of Gradle (at least 8.6.0, as required for SDK 35), but the build still fails with the same error. Here’s my build.gradle
file:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
mavenCentral()
// jcenter() // keeped as anchor, will be removed soon
}
dependencies {
classpath 'com.android.tools.build:gradle:8.11.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
mavenCentral()
// jcenter() // keeped as anchor, will be removed soon
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Question:
How can I build a game that targets Android API level 35? Is it not supported yet?