Build Fails on AppFlow with compileSdk = 35: android.jar Cannot Be Loaded

Hi everyone,
I’m encountering an issue when building my Capacitor app on Ionic AppFlow using compileSdk = 35.

The Problem
The build fails with this error during resource bundling:

Execution failed for task ':app:bundleReleaseResources'.
> A failure occurred while executing com.android.build.gradle.internal.res.Aapt2ProcessResourcesRunnable
   > Android resource linking failed
     aapt2 E LoadedArsc.cpp:94] RES_TABLE_TYPE_TYPE entry offsets overlap actual entry data.
     aapt2 E ApkAssets.cpp:152] Failed to load resources table in APK '/opt/android-sdk/platforms/android-35/android.jar'.
     error: failed to load include path /opt/android-sdk/platforms/android-35/android.jar.

It seems like android.jar for API 35 is either corrupt or incomplete in the AppFlow build environment.
When I switch back to compileSdk = 34, the build works perfectly both locally and on AppFlow, which suggests the issue is isolated to API 35 on AppFlow’s side.

Additional Context

  • I’m using Android Gradle Plugin 8.0.0.
  • I’ve added android.suppressUnsupportedCompileSdk=35 to gradle.properties, which silences the warning but doesn’t fix the build failure.
  • Locally, I can build with API 35 using the same codebase and Gradle configuration.

Question

  • Has anyone else experienced this issue with API 35 on AppFlow?
  • Is there a way to request or trigger a fresh install of android-35 in the AppFlow build container? Or would this need to be handled on the Ionic team’s side?

Any guidance, confirmation, or suggestions would be truly appreciated. Thanks so much for the great work and for keeping this community helpful and collaborative! :blush:

which build stack are you using?
SDK 35 is only available on 2024.10 or newer

Thanks for your reply!

I double-checked and I’m using the Linux - 2025.01 build stack, which should be compatible with SDK 35. Here are the relevant details from the stack:

  • Android SDK: 27–35
  • Gradle: 8.10.2
  • Ionic CLI: 7.2.0
  • Cordova CLI: 12.0.0
  • Node.js: 18.20.6 / 20.18.2 / 22.13.1
  • Debian: 12.9

So unless I’m missing something, it looks like SDK 35 is installed — but the error suggests that android.jar might be corrupted or incomplete in the environment:

Failed to load resources table in APK '/opt/android-sdk/platforms/android-35/android.jar'.

Let me know if there’s anything else I should check or configure. Really appreciate the help!

Try using 2024.10 or 2025.06 and see if they work

Thanks so much for the tip!
I’ll give 2024.10 or 2025.06 a try and see how it goes.
Appreciate your help!

Thanks @julio-ionic!
Switching to the 2025.06 stack solved the problem.
Really appreciate your help!

Thanks for the update, I’ll let the appflow team know so they can check what’s wrong with 2025.01