Search Issue Tracker
Fixed in 2022.1.X
Votes
0
Found in
2018.4
2019.4
2019.4.20f1
2020.3
2021.1
2021.2
Issue ID
1325245
Regression
No
[Android] Build fails with "launcher:checkReleaseDuplicateClasses" when using Kotlin plugins in your project
Repro steps:
1. Open the project
2. Build for Android
Actual: Build fails
Expected: Build should succeed
Reproducible with: 2018.4.34f1, 2019.4.24f1, 2020.3.4f1, 2021.1.1f1, 2021.2.0a11
Add comment
All about bugs
View bugs we have successfully reproduced, and vote for the bugs you want to see fixed most urgently.
Latest issues
- Articulation Body with 'Revolute' Joint Type has erratic behavior when Upper Limit is set to above 360
- WebGL Player fails to render Scene when Terrain with Detail Mesh is added and WebGPU Graphics API is used
- Inconsistent errors are logged when different types are passed into the Query "Q<>" method in UIToolkit and the ancestor VisualElement is null
- Crash on GetMaterialPropertyByIndex when opening a specific Scene
- Discrepancies in the styling are present when using a TSS file instead of a USS file in custom EditorWindow
Resolution Note (fix version 2022.1):
There are two issues here. One is that we use a rather old version of Kotlin which causes problems with Android Studio for the users project. Upgrading Kotlin version solves the problem.
Another problem is the plugin itself used in the project. It uses a particular version of Kotlin and exposes it to the rest of the project, so if Gradle project generated by Unity uses different version of Kotlin, it results in conflict, while using the same version but including kotlin stdlib as "implementation" causes duplicate jar error. This should be solved by the user either by rebuilding the .aar plugin with different settings or using custom gradle templates that have exactly the same kotlin version and don't have "implementation" for kotlin stdlib, since that is already provided by the included .aar.