Closed phuc-nor closed 3 months ago
@phuc-nor
Everything worked on my end using 2021 and the latest version of the aforementioned packages. Gradle / Android build issues can be super frustrating and I recommend following Upgrade Gradle for Android. Please note that the steps are ordered, and you may need to remove old gradle files for this to work.
Hello @NVentimiglia. Thanks for your reply. I'm doing great with Applovin 7.2.2 which mean I already have followed all the step that you recommended. (including custom Gradle v6.7.1 and set build tool to 4.2.0 in projectTemplate.gradle) but still met the issue above. However, I managed to build with API target 34 along with this guide to pass the issue.
Option 2 - Direct Gradle to use a newer AAPT2 version to compile your project. You can do this by
1. [Visit](https://maven.google.com/web/index.html?q=aapt#com.android.tools.build:aapt2:7.2.2-7984345) the AAPT2 page on Google Maven
2. Download AAPT2 7.2.2 JAR for your build architecture
3. Unpack jar file
4. From Unity editor, go to Player Settings → Publishing → Custom Gradle Templates
5. Enable Custom Gradle Properties Template.
6. Open the newly created: Assets/Plugins/Android/gradleTemplate.properties file.
7. Add a line with android.aapt2FromMavenOverride=/replace/with/path/to/your/aapt2
This will instruct the Android Gradle Plugin to use this newer version of the linking tool.
8. Build as usual. This should enable your project to move past the issue.
I'm also experience same problem with #3379 Thank you.
[REQUIRED] Step 1: Describe your environment
[REQUIRED] Step 2: Describe the problem
The project build fine with Applovin 7.2.2 but when i tried to update adapter to 7.3.0 the error occur when build
The minCompileSdk (34) specified in a dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties) is greater than this module's compileSdkVersion (android-33). Dependency: androidx.webkit:webkit:1.11.0-alpha02.
Should I upgrade Android API to 34 which need to update Unity Editor?