Search Unity

  1. Unity 6 Preview is now available. To find out what's new, have a look at our Unity 6 Preview blog post.
    Dismiss Notice
  2. Unity is excited to announce that we will be collaborating with TheXPlace for a summer game jam from June 13 - June 19. Learn more.
    Dismiss Notice

Bug LevelPlay simply does not work on Android with default settings

Discussion in 'Unity Ads & User Acquisition' started by valonsoft, Mar 3, 2023.

  1. valonsoft

    valonsoft

    Joined:
    May 22, 2016
    Posts:
    28
    After wasting countless development hours trying to make it work as well as looking up several similar complaints from others (especially non experienced developers), I have concluded that it's virtually impossible to set up Ironsource's Levelplay using following just the instructions on their website and what's available on Unity Docs

    It seems that only those well experienced in the art of gradle mortal combat can surmount countless gradle errors to have it work and show ads. It also seems that most of the problems center around External Dependency Resolver not properly resolving the required files.


    Current Setup
    1) Import Ironsource SDK on a blank project

    2) Enable both custom gradle property and custom main gradle template options in publishing settings (There would dependency resolution errors if this is not done)

    3) add this to gradle.properties file (there would be compilation errors if this is not done )
    android.useAndroidX=true
    android.enableJetifier=true

    4) Dependency resolver > resolve

    5) Dependency resolver > delete resolved libraries (I get various build errors if I don't do this)

    6) build

    The project builds successfully but sample ads don't show. On Logcat, I get this error

    <i>Autoconnected Player "Autoconnected Player"</i> AndroidJavaException: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/ironsource/mediationsdk/sdk/InitializationListener;
    java.lang.NoClassDefFoundError: Failed resolution of: Lcom/ironsource/mediationsdk/sdk/InitializationListener


    ;
     
    DonJorris and FamishedMammal like this.
  2. valonsoft

    valonsoft

    Joined:
    May 22, 2016
    Posts:
    28
    Please anyone that has gotten Unity level play to work should please post some pointers — especially on external dependency resolver settings
     
  3. dave_oak

    dave_oak

    Joined:
    Oct 7, 2015
    Posts:
    26
    I've got it working eventually on Android, so I feel somewhat blessed. We're just using rewarded video. I went back, in detail, through the setup here, including the link to Unity integration. I did not setup server to server callbacks.

    https://developers.is.com/ironsourc...ewarded-video-on-ironsource-dashboard/#step-1

    The final step before it started working was to setup the app-ads.txt file on our website, which is the site configured in Google Play for our app under Store Settings / Store Listing Contact Details. I'm not sure if this was critical or not.

    However, I am still waiting to receive a Publisher Account ID to include in this file, so have commented out the IronSource line for now.

    Find an ads.txt validator online to iron out problems in the file.

    https://developers.is.com/ironsource-mobile/general/app-ads-txt/#step-1

    I am also still waiting for account approval, so cannot go live with the update.

    I never saw the error that you have so cannot give advice on that specifically.
     
  4. Unity-Boon

    Unity-Boon

    Unity Technologies

    Joined:
    Jan 18, 2017
    Posts:
    135
  5. valonsoft

    valonsoft

    Joined:
    May 22, 2016
    Posts:
    28
    I have finally solved this problem. The main issue is that the Gradle installation that comes with Unity 2022.2 has some bugs that prevents Ironsource from compiling successfully by default (I don't know whether android.enabledR8 errors have been fixed with Unity 2021 LTS though). I got it to work using the instructions here: https://github.com/googlesamples/unity-jar-resolver/issues/594

    I would be creating another thread later to explain the steps I took to solve these problems — at least that would be helpful to newbies
     
    Last edited: Mar 9, 2023
    Unity-Boon likes this.
  6. Brother_77

    Brother_77

    Joined:
    Feb 8, 2019
    Posts:
    233
    Hi could you please add the link to the thread where you explained the steps?

    Also, how could I check if 2020.3 LTS is good or corrupted with regards to this issue ?
     
  7. rbitard

    rbitard

    Joined:
    Jan 11, 2022
    Posts:
    197
    I'm wasting countless hours on making some Levelplay adapters works (unityAdsSDK for example)
    Did you have any problems or did you do something about that ?
     
  8. valonsoft

    valonsoft

    Joined:
    May 22, 2016
    Posts:
    28
  9. valonsoft

    valonsoft

    Joined:
    May 22, 2016
    Posts:
    28
    First check whether the test ads work or not
     
  10. rbitard

    rbitard

    Joined:
    Jan 11, 2022
    Posts:
    197
    I've done a ton of things including copying the resolver from ironsource demo project
     
  11. mvdevp

    mvdevp

    Joined:
    Aug 15, 2021
    Posts:
    3