Copyright © 2026 Unity Technologies
Steps to reproduce:
1. Create a blank project in Unity 2021.3 for Android
2. Make sure the “Target API Level” is set to API 34
3. Enable custom Gradle Template for 'unityLibrary'
4. Under 'deps' add " implementation "androidx.legacy:legacy-support-v4:1.0.0'""
5. Enable custom properties and add Jetifier & androidX
6. Build project.
Or get the zip folder attached (from Scopely's test project)
Actual results:
Build fails with
Execution failed for task ':launcher:processDebugResources'. > A failure occurred while executing com.android.build.gradle.internal.res.LinkApplicationAndroidResourcesTask$TaskAction > AAPT2 aapt2-4.2.2-7147631-osx Daemon #0: Unexpected error during link, attempting to stop daemon. This should not happen under normal circumstances, please file an issue if it does.
This library, alongside with v13 is one of the core Androidx legacy libraries and used by SDKs such as Facebook, OneSignal etc. Usages examples .
It is currently not know if other Libraries are also affected - I have tried sporadic androidX libraries but they compiled OK.
By August 31st 2024, users are required to target API 34 in order to update apps on the play store.
Expected results:
Build compiles with no errors
Reproducible with versions:
2021.3.x with targetSDK 34 and AGP 4.2.2 / Gradle 6.7.1 / Java 8 / Buld Tools 30
2021.3.x with target SDK 34 and updated build-tools to 31/32/33/34
Test result from others
AGP 4.2.2 / gradle 6.7.1 / 33 - success
AGP 4.2.2 / gradle 6.7.1 / 34 - fail
AGP 4.2.2 / gradle 7.6.2 / 34 - fail
AGP 7.0.0 / gradle 7.0.2 / 34 - fail
AGP 7.0.0 / gradle 7.6.2 / 34 - fail
AGP 7.1.0 / gradle 7.2 / 34 - success
AGP 7.1.0 / gradle 7.6.2 / 34 - success
Not reproducible with versions / combinations:
Notes:
Issues you vote on will appear here