After using Unity 2021.3.41, the AAPT2 issue is fixed, but I encountered a new bug (1). I think it is caused by the new AGP versions. After performing the following steps:
- Copy settingsTemplate.gradle from
Unity\Hub\Editor\2021.3.41f1\Editor\Data\PlaybackEngines\AndroidPlayer\Tools\GradleTemplates
to Plugin/Android.
- Delete dependencyResolutionManagement block in settingsTemplate.gradle
- Add all my repositories into settingsTemplate.gradle
- Force Resolve with EDM4U
- Build Project.
Then the bugs change to (2).
All this bugs is appear with warning:
WARNING:We recommend using a newer Android Gradle plugin to use compileSdk = 34
Plugins in my project:
- IronSource: 7.5.1
- GoogleMobileAds: 8.5.1
- Firebase: 11.0.0
FAILURE: Build completed with 3 failures.
1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':launcher:checkReleaseDuplicateClasses'.
> Could not resolve all files for configuration ':launcher:releaseRuntimeClasspath'.
> Could not find com.google.firebase:firebase-analytics-unity:11.0.0.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/google/firebase/firebase-analytics-unity/11.0.0/firebase-analytics-unity-11.0.0.pom
- https://repo.maven.apache.org/maven2/com/google/firebase/firebase-analytics-unity/11.0.0/firebase-analytics-unity-11.0.0.pom
- file:/E:/Unity-Work/Dreamy/Stickman Falling/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/libs/firebase-analytics-unity-11.0.0.jar
- file:/E:/Unity-Work/Dreamy/Stickman Falling/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/libs/firebase-analytics-unity.jar
Required by:
project :launcher > project :unityLibrary
> Could not find com.google.firebase:firebase-app-unity:11.0.0.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/google/firebase/firebase-app-unity/11.0.0/firebase-app-unity-11.0.0.pom
- https://repo.maven.apache.org/maven2/com/google/firebase/firebase-app-unity/11.0.0/firebase-app-unity-11.0.0.pom
- file:/E:/Unity-Work/Dreamy/Stickman Falling/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/libs/firebase-app-unity-11.0.0.jar
- file:/E:/Unity-Work/Dreamy/Stickman Falling/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/libs/firebase-app-unity.jar
Required by:
project :launcher > project :unityLibrary
> Could not find com.google.firebase:firebase-config-unity:11.0.0.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/google/firebase/firebase-config-unity/11.0.0/firebase-config-unity-11.0.0.pom
- https://repo.maven.apache.org/maven2/com/google/firebase/firebase-config-unity/11.0.0/firebase-config-unity-11.0.0.pom
- file:/E:/Unity-Work/Dreamy/Stickman Falling/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/libs/firebase-config-unity-11.0.0.jar
- file:/E:/Unity-Work/Dreamy/Stickman Falling/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/libs/firebase-config-unity.jar
Required by:
project :launcher > project :unityLibrary
> Could not find com.google.firebase:firebase-crashlytics-unity:11.0.0.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/google/firebase/firebase-crashlytics-unity/11.0.0/firebase-crashlytics-unity-11.0.0.pom
- https://repo.maven.apache.org/maven2/com/google/firebase/firebase-crashlytics-unity/11.0.0/firebase-crashlytics-unity-11.0.0.pom
- file:/E:/Unity-Work/Dreamy/Stickman Falling/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/libs/firebase-crashlytics-unity-11.0.0.jar
- file:/E:/Unity-Work/Dreamy/Stickman Falling/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/libs/firebase-crashlytics-unity.jar
Required by:
project :launcher > project :unityLibrary
> Could not find com.google.firebase:firebase-firestore-unity:11.0.0.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/google/firebase/firebase-firestore-unity/11.0.0/firebase-firestore-unity-11.0.0.pom
- https://repo.maven.apache.org/maven2/com/google/firebase/firebase-firestore-unity/11.0.0/firebase-firestore-unity-11.0.0.pom
- file:/E:/Unity-Work/Dreamy/Stickman Falling/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/libs/firebase-firestore-unity-11.0.0.jar
- file:/E:/Unity-Work/Dreamy/Stickman Falling/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/libs/firebase-firestore-unity.jar
Required by:
project :launcher > project :unityLibrary
> Could not find com.google.firebase:firebase-messaging-unity:11.0.0.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/google/firebase/firebase-messaging-unity/11.0.0/firebase-messaging-unity-11.0.0.pom
- https://repo.maven.apache.org/maven2/com/google/firebase/firebase-messaging-unity/11.0.0/firebase-messaging-unity-11.0.0.pom
- file:/E:/Unity-Work/Dreamy/Stickman Falling/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/libs/firebase-messaging-unity-11.0.0.jar
- file:/E:/Unity-Work/Dreamy/Stickman Falling/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/libs/firebase-messaging-unity.jar
Required by:
project :launcher > project :unityLibrary
> Could not find com.ironsource.adapters:admobadapter:4.3.39.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/ironsource/adapters/admobadapter/4.3.39/admobadapter-4.3.39.pom
- https://repo.maven.apache.org/maven2/com/ironsource/adapters/admobadapter/4.3.39/admobadapter-4.3.39.pom
- file:/E:/Unity-Work/Dreamy/Stickman Falling/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/libs/admobadapter-4.3.39.jar
- file:/E:/Unity-Work/Dreamy/Stickman Falling/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/libs/admobadapter.jar
Required by:
project :launcher > project :unityLibrary
> Could not find com.ironsource.adapters:applovinadapter:4.3.39.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/ironsource/adapters/applovinadapter/4.3.39/applovinadapter-4.3.39.pom
- https://repo.maven.apache.org/maven2/com/ironsource/adapters/applovinadapter/4.3.39/applovinadapter-4.3.39.pom
- file:/E:/Unity-Work/Dreamy/Stickman Falling/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/libs/applovinadapter-4.3.39.jar
- file:/E:/Unity-Work/Dreamy/Stickman Falling/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/libs/applovinadapter.jar
Required by:
project :launcher > project :unityLibrary
> Could not find com.ironsource.adapters:facebookadapter:4.3.45.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/ironsource/adapters/facebookadapter/4.3.45/facebookadapter-4.3.45.pom
- https://repo.maven.apache.org/maven2/com/ironsource/adapters/facebookadapter/4.3.45/facebookadapter-4.3.45.pom
- file:/E:/Unity-Work/Dreamy/Stickman Falling/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/libs/facebookadapter-4.3.45.jar
- file:/E:/Unity-Work/Dreamy/Stickman Falling/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/libs/facebookadapter.jar
Required by:
project :launcher > project :unityLibrary
> Could not find com.ironsource.adapters:fyberadapter:4.3.27.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/ironsource/adapters/fyberadapter/4.3.27/fyberadapter-4.3.27.pom
- https://repo.maven.apache.org/maven2/com/ironsource/adapters/fyberadapter/4.3.27/fyberadapter-4.3.27.pom
- file:/E:/Unity-Work/Dreamy/Stickman Falling/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/libs/fyberadapter-4.3.27.jar
- file:/E:/Unity-Work/Dreamy/Stickman Falling/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/libs/fyberadapter.jar
Required by:
project :launcher > project :unityLibrary
> Could not find com.ironsource.adapters:inmobiadapter:4.3.18.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/ironsource/adapters/inmobiadapter/4.3.18/inmobiadapter-4.3.18.pom
- https://repo.maven.apache.org/maven2/com/ironsource/adapters/inmobiadapter/4.3.18/inmobiadapter-4.3.18.pom
- file:/E:/Unity-Work/Dreamy/Stickman Falling/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/libs/inmobiadapter-4.3.18.jar
- file:/E:/Unity-Work/Dreamy/Stickman Falling/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/libs/inmobiadapter.jar
Required by:
project :launcher > project :unityLibrary
> Could not find com.ironsource.adapters:mintegraladapter:4.3.18.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/ironsource/adapters/mintegraladapter/4.3.18/mintegraladapter-4.3.18.pom
- https://repo.maven.apache.org/maven2/com/ironsource/adapters/mintegraladapter/4.3.18/mintegraladapter-4.3.18.pom
- file:/E:/Unity-Work/Dreamy/Stickman Falling/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/libs/mintegraladapter-4.3.18.jar
- file:/E:/Unity-Work/Dreamy/Stickman Falling/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/libs/mintegraladapter.jar
Required by:
project :launcher > project :unityLibrary
> Could not find com.ironsource.adapters:pangleadapter:4.3.21.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/ironsource/adapters/pangleadapter/4.3.21/pangleadapter-4.3.21.pom
- https://repo.maven.apache.org/maven2/com/ironsource/adapters/pangleadapter/4.3.21/pangleadapter-4.3.21.pom
- file:/E:/Unity-Work/Dreamy/Stickman Falling/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/libs/pangleadapter-4.3.21.jar
- file:/E:/Unity-Work/Dreamy/Stickman Falling/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/libs/pangleadapter.jar
Required by:
project :launcher > project :unityLibrary
> Could not find com.ironsource.adapters:unityadsadapter:4.3.31.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/ironsource/adapters/unityadsadapter/4.3.31/unityadsadapter-4.3.31.pom
- https://repo.maven.apache.org/maven2/com/ironsource/adapters/unityadsadapter/4.3.31/unityadsadapter-4.3.31.pom
- file:/E:/Unity-Work/Dreamy/Stickman Falling/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/libs/unityadsadapter-4.3.31.jar
- file:/E:/Unity-Work/Dreamy/Stickman Falling/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/libs/unityadsadapter.jar
Required by:
project :launcher > project :unityLibrary
> Could not find com.ironsource.adapters:vungleadapter:4.3.21.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/ironsource/adapters/vungleadapter/4.3.21/vungleadapter-4.3.21.pom
- https://repo.maven.apache.org/maven2/com/ironsource/adapters/vungleadapter/4.3.21/vungleadapter-4.3.21.pom
- file:/E:/Unity-Work/Dreamy/Stickman Falling/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/libs/vungleadapter-4.3.21.jar
- file:/E:/Unity-Work/Dreamy/Stickman Falling/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/libs/vungleadapter.jar
Required by:
project :launcher > project :unityLibrary
> Could not find com.ironsource.sdk:mediationsdk:7.5.1.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/ironsource/sdk/mediationsdk/7.5.1/mediationsdk-7.5.1.pom
- https://repo.maven.apache.org/maven2/com/ironsource/sdk/mediationsdk/7.5.1/mediationsdk-7.5.1.pom
- file:/E:/Unity-Work/Dreamy/Stickman Falling/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/libs/mediationsdk-7.5.1.jar
- file:/E:/Unity-Work/Dreamy/Stickman Falling/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/libs/mediationsdk.jar
Required by:
project :launcher > project :unityLibrary
> Could not find com.mbridge.msdk.oversea:mbbanner:16.5.11.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/mbridge/msdk/oversea/mbbanner/16.5.11/mbbanner-16.5.11.pom
- https://repo.maven.apache.org/maven2/com/mbridge/msdk/oversea/mbbanner/16.5.11/mbbanner-16.5.11.pom
- file:/E:/Unity-Work/Dreamy/Stickman Falling/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/libs/mbbanner-16.5.11.jar
- file:/E:/Unity-Work/Dreamy/Stickman Falling/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/libs/mbbanner.jar
Required by:
project :launcher > project :unityLibrary
> Could not find com.mbridge.msdk.oversea:mbbid:16.5.11.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/mbridge/msdk/oversea/mbbid/16.5.11/mbbid-16.5.11.pom
- https://repo.maven.apache.org/maven2/com/mbridge/msdk/oversea/mbbid/16.5.11/mbbid-16.5.11.pom
- file:/E:/Unity-Work/Dreamy/Stickman Falling/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/libs/mbbid-16.5.11.jar
- file:/E:/Unity-Work/Dreamy/Stickman Falling/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/libs/mbbid.jar
Required by:
project :launcher > project :unityLibrary
> Could not find com.mbridge.msdk.oversea:newinterstitial:16.5.11.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/mbridge/msdk/oversea/newinterstitial/16.5.11/newinterstitial-16.5.11.pom
- https://repo.maven.apache.org/maven2/com/mbridge/msdk/oversea/newinterstitial/16.5.11/newinterstitial-16.5.11.pom
- file:/E:/Unity-Work/Dreamy/Stickman Falling/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/libs/newinterstitial-16.5.11.jar
- file:/E:/Unity-Work/Dreamy/Stickman Falling/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/libs/newinterstitial.jar
Required by:
project :launcher > project :unityLibrary
> Could not find com.mbridge.msdk.oversea:reward:16.5.11.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/mbridge/msdk/oversea/reward/16.5.11/reward-16.5.11.pom
- https://repo.maven.apache.org/maven2/com/mbridge/msdk/oversea/reward/16.5.11/reward-16.5.11.pom
- file:/E:/Unity-Work/Dreamy/Stickman Falling/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/libs/reward-16.5.11.jar
- file:/E:/Unity-Work/Dreamy/Stickman Falling/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/libs/reward.jar
Required by:
project :launcher > project :unityLibrary
> Could not find com.pangle.global:ads-sdk:5.4.0.2.
Searched in the following locations:
- https://dl.google.com/dl/android/maven2/com/pangle/global/ads-sdk/5.4.0.2/ads-sdk-5.4.0.2.pom
- https://repo.maven.apache.org/maven2/com/pangle/global/ads-sdk/5.4.0.2/ads-sdk-5.4.0.2.pom
- file:/E:/Unity-Work/Dreamy/Stickman Falling/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/libs/ads-sdk-5.4.0.2.jar
- file:/E:/Unity-Work/Dreamy/Stickman Falling/Library/Bee/Android/Prj/IL2CPP/Gradle/unityLibrary/libs/ads-sdk.jar
Required by:
project :launcher > project :unityLibrary
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
==============================================================================
2: Task failed with an exception.
-----------
* What went wrong:
java.lang.StackOverflowError (no error message)
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
==============================================================================
3: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':unityLibrary:generateReleaseRFile'.
> Could not resolve all files for configuration ':unityLibrary:releaseCompileClasspath'.
> Could not find com.google.firebase:firebase-analytics-unity:11.0.0.
Required by:
project :unityLibrary
> Could not find com.google.firebase:firebase-app-unity:11.0.0.
Required by:
project :unityLibrary
> Could not find com.google.firebase:firebase-config-unity:11.0.0.
Required by:
project :unityLibrary
> Could not find com.google.firebase:firebase-crashlytics-unity:11.0.0.
Required by:
project :unityLibrary
> Could not find com.google.firebase:firebase-firestore-unity:11.0.0.
Required by:
project :unityLibrary
> Could not find com.google.firebase:firebase-messaging-unity:11.0.0.
Required by:
project :unityLibrary
> Could not find com.ironsource.adapters:admobadapter:4.3.39.
Required by:
project :unityLibrary
> Could not find com.ironsou<message truncated>
After:
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* What went wrong:
Execution failed for task ':launcher:checkReleaseDuplicateClasses'.
> Could not resolve all files for configuration ':launcher:releaseRuntimeClasspath'.
> Could not find :simple-android-notifications:.
Required by:
project :launcher > project :unityLibrary
> Could not find :IngameDebugConsole:.
Required by:
project :launcher > project :unityLibrary
> Could not find :common:.
Required by:
project :launcher > project :unityLibrary
> Could not find :NativeGallery:.
Required by:
project :launcher > project :unityLibrary
> Could not find :firebase-messaging-cpp:.
Required by:
project :launcher > project :unityLibrary
> Could not find :googlemobileads-unity:.
Required by:
project :launcher > project :unityLibrary
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
==============================================================================
2: Task failed with an exception.
-----------
* What went wrong:
java.lang.StackOverflowError (no error message)
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.