LevelPlay simply does not work on Android with default settings

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

Autoconnected Player “Autoconnected Player” AndroidJavaException: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/ironsource/mediationsdk/sdk/InitializationListener;
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/ironsource/mediationsdk/sdk/InitializationListener

;

2 Likes

Please anyone that has gotten Unity level play to work should please post some pointers — especially on external dependency resolver settings

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.

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.

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.

It would be better for you to contact the dedicated Unity LevelPlay support team for your LevelPlay-related questions.

If you are having problems getting your LevelPlay advertisements to display I would recommend you consult the LevelPlay FAQ here: https://developers.is.com/ironsource-mobile/unity/troubleshooting-dont-see-ads-app/

If you are having other issues relating to LevelPlay, you can reach out to their support team here: knowledge center New 2022

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: [Bug] Android Gradle project repositories block don't work for the latest Unity versions · Issue #594 · googlesamples/unity-jar-resolver · GitHub

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

1 Like

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 ?

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 ?

I think Dependency resolver has fixed this issue, so the latest one should work. Someone please confirm

First check whether the test ads work or not

I’ve done a ton of things including copying the resolver from ironsource demo project

it worked for me, thanks.
now demo ads working