Question

This happens when I try to build an Android project or to run the emulator

I am new to Android development. This happens when I try to build a project or to run the emulator.

ERROR:: AAPT: aapt2.exe E 06-27 15:30:04  3616  2980 LoadedArsc.cpp:96] RES_TABLE_TYPE_TYPE entry offsets overlap actual entry data.  
aapt2.exe E 06-27 15:30:04  3616  2980 ApkAssets.cpp:149] Failed to load resources table in APK 'C:\Users\Korisnik\AppData\Local\Android\Sdk\platforms\android-35\android.jar'.  
error: failed to load include path 
C:\Users\Korisnik\AppData\Local\Android\Sdk\platforms\android-35\android.jar.

I tried fully reinstalling everything.

 3  2344  3
1 Jan 1970

Solution

 4

It's an AGP error. Sadly, Google kept the bug in the issue tracker instead of making a blog or a proper error message. Upgrade your project's values as follows (my current working combination):

com.android.tools.build:gradle -> 8.4.2
file:gradle-wrapper.properties : distributionUrl -> gradle-8.6-bin.zip

Check out: https://issuetracker.google.com/issues/342522139
Edit: For the future, the above combination might not work so be sure to also check out: https://developer.android.com/build/releases/gradle-plugin#compatibility

2024-06-29
Blessing Charumbira