Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.
  2. We have updated the language to the Editor Terms based on feedback from our employees and community. Learn more.
    Dismiss Notice
  3. Join us on November 16th, 2023, between 1 pm and 9 pm CET for Ask the Experts Online on Discord and on Unity Discussions.
    Dismiss Notice
  4. Dismiss Notice

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

Discussion in 'Editor & General Support' started by deltron1830, Oct 5, 2017.

  1. deltron1830

    deltron1830

    Joined:
    Mar 20, 2013
    Posts:
    27
    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.
     
  2. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    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 https://forum.unity.com/forums/unity-iap.112/
     
  3. deltron1830

    deltron1830

    Joined:
    Mar 20, 2013
    Posts:
    27
    I tried that, and no. I could not get it to work with this project,. Thanks for replying, I didnt see the IAP forum
     
  4. JeffDUnity3D

    JeffDUnity3D

    Unity Technologies

    Joined:
    May 2, 2017
    Posts:
    14,446
    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.