I am just going mad with this build error. I have integrated Google Mobile Ads plugin. I have also integrated Google Mobile Ads Mediation for Unity Ads and Meta (Facebook). Everything was fine till then. I was able to build the project without any error. But then I have decided to add three more networks adapters (AdColony, AppLovin and InMobi). After that build has started throwing following error. I get the same build error even either of these. If I remove these three (keeping Unity Ads and Meta adapters), build works fine. I have tried many solutions mentioned on different forums, changed Gradle version even upgraded to Unity 2022, but as long as these three adapters are there, this build error is there. Please someone help me out.
WARNING: The option setting ‘android.enableR8=false’ is deprecated.
It will be removed in version 5.0 of the Android Gradle plugin.
You will no longer be able to disable R8
Exception while marshalling C:\Program Files\Unity\Hub\Editor\2020.3.38f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\build-tools\30.0.2\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\2020.3.38f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platform-tools\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\2020.3.38f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-29\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\2020.3.38f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\platforms\android-30\package.xml. Probably the SDK is read-only
Exception while marshalling C:\Program Files\Unity\Hub\Editor\2020.3.38f1\Editor\Data\PlaybackEngines\AndroidPlayer\SDK\tools\package.xml. Probably the SDK is read-only
…
Task :launcher:processReleaseResources FAILED
Task :launcher:bundleReleaseResources FAILED
Error after above exception
Note: …\Temp\gradleOut\unityLibrary\src\main\java\com\unity3d\player\UnityPlayerActivity.java uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
- What went wrong:
Execution failed for task ‘:launcher:processReleaseResources’.
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
Android resource linking failed
C:\Users\Sudeep Jain.gradle\caches\transforms-2\files-2.1\f243f87f287fb4f4052bd069a9b71980\androidx.core.core-1.7.0\res\values\values.xml:105:5-114:25: AAPT: error: resource android:attr/lStar not found.
- 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:
Execution failed for task ‘:launcher:bundleReleaseResources’.
A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
Android resource linking failed
C:\Users\Sudeep Jain.gradle\caches\transforms-2\files-2.1\f243f87f287fb4f4052bd069a9b71980\androidx.core.core-1.7.0\res\values\values.xml:105:5-114:25: AAPT: error: resource android:attr/lStar not found.
- 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.
============================================================================== - Get more help at https://help.gradle.org
BUILD FAILED in 1m 19s
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
UnityEngine.GUIUtility:ProcessEvent (int,intptr,bool&)