Search Unity

Bug Advertisement Package breaks android build.

Discussion in 'Unity Ads & User Acquisition' started by peq42, Nov 6, 2022.

  1. peq42

    peq42

    Joined:
    Mar 4, 2022
    Posts:
    74
    Upon adding the advertisement package from unity's package manager, my project won't build for android anymore.

    It keeps throwing an error "unity > Configure project :launcher WARNING: The option 'android.enableR8' is deprecated and should not be used anymore. It will be removed in a future version of the Android Gradle plugin, and will no longer allow you to disable R8." after almost 10 minutes of building.

    I've tried everything. I tried going to Resolver settings and turning jetifier off(it turns itself on again), I tried commenting the android.enableR8 = true in the gradle template file, I tried re-installing unity... Nothing works. So at this point, considering that my project works fine without it, I'll assume its unity's fault.

    Any work arounds until it gets properly fixed? I'm using 2021 LTS

    EDIT:
    the issue seems related to MULTIPLE duplicate java classes that come with the advertisement package.... any way to automatically solve those?
     
    Last edited: Nov 6, 2022
  2. Unity-Boon

    Unity-Boon

    Unity Technologies

    Joined:
    Jan 18, 2017
    Posts:
    135
    If you are currently integrating using the Unity Mediation package, you won't need to add the Unity Ads package separately. Please remove the Unity Ads package from your project and check again.
     
  3. peq42

    peq42

    Joined:
    Mar 4, 2022
    Posts:
    74
    Tried, theres still several duplicated classes
     
  4. Unity-Boon

    Unity-Boon

    Unity Technologies

    Joined:
    Jan 18, 2017
    Posts:
    135
    Can you send us a test project which can reproduce the above issues? We need to take a look and investigate for more details.

    You can contact the support team through unityads-support@unity3d.com