In IAP 4.12.0, we updated to Google Play Billing Library 6 which introduced a new dependency which required us to support it.
Some Android build issues have been happening following this change. We have compiled a list of steps to take if you are experiencing these issues in order to resolve them.
If this still doesn’t solve your problem, make a post with a list of dependencies and Unity editor version your project uses so we can reproduce the issue and help you solve it.
1- Using EDM4U (External Dependency Manager for Unity)
- Verify if your project contains both EDM4U and MDR (Mobile Dependency Resolver). If it has both, remove MDR.
- In the Project Settings, under Player → Publishing Settings for Android, make sure both Custom Main Gradle Template and Custom Gradle Properties Template are enabled.
- Enable Patch mainTemplate.gradle and Copy and patch settingsTemplate.gradle from 2022.2 by going in Assets → External Dependency Manager → Android Resolver → Settings. If you don’t have this option, update your External Dependency Manager.
- Force resolve the dependencies by going in Assets → External Dependency Manager → Android Resolver → Force Resolve
2- If your project has Google Mobile Ads and you are receiving this error:
Cannot change dependencies of dependency configuration ‘:unityLibrary:implementation’ after it has been included in dependency resolution.
Disable the Remove property tag from GMA Android SDK in Assets → Google Mobile Ads → Settings…
3- If you get the following error:
java.lang.NoClassDefFoundError: Could not initialize class org.codehaus.groovy.vmplugin.v7.Java7
Go in Unity → Settings → External Tools, then disable and reenable the Android JDK, SDK and NDK.




