Adding the Unity IAP package has provented me from building to Android

Building fails during the converting classes to dex format stage as there are more than 65536 field references

I making a F2P mobile game and have a few libraries, facebook (to login), appodeal (for ads), firebase (for push notifications), gamesparks (backend)). I had this issue before when I added firebase but I was able to fix it before by removing parts of appodeal.

The weird thing now is that even if I remove more bits of appodeal that number does not change 69881. Ive also tried deleting some aars from Unity IAP and still that number does not change.

I’m stumped as to how to implement IAPs on Android now.

Are you able to Export the project from Unity, then build from the command line or in Android Studio? From File/Build Settings, set Gradle as the Build System, and select Export Project. Otherwise, I would encourage you to also post in the IAP forum Unity Services - Unity Discussions

I tried that, and no. I could not get it to work with this project,. Thanks for replying, I didnt see the IAP forum

I assume you did a Clean first? You would need to be under the field reference limit. If you Google for that error, you’ll mind many recommendations.