androidunity-game-engine

Unity ironsource.mediationsdk.adunit.adapter.utility does not exist Error


I am experiencing a problem whenever I install the Ads Mediation package from package manager. While the building phase, it builds game data and afterwards it starts to build gradle side. On that side (java side) it returns an error. It can't find the com.ironsource.mediationsdk.

I have tried almost everything. I have downloaded LevelPlay plugin from docs and import it. I have deleted Library folder and recreate it. I have uninstalled and installed Ads Mediation package. I have tried to run from unity editor Assets/MobileDependencyResolver/AndroidResolver/ForceResolve and Normal Resolve. Of course it returned gradlew.bat is missing error. And I have rewrite gradlew.bat and from CMD I have installed dependencies. I tried to put gradlew.bat from Unity-Jar-Resolver 1.2.186 from github package. Nothing works!

Conclusion, I have problems with com.ironsource.mediationsdk library. here is the error description: "error: package com.ironsource.mediationsdk.adunit.adapter.utility does not exist import com.ironsource.mediationsdk.adunit.adapter.utility.AdInfo;" -> there are so many errors that refers to com.ironsource.mediationsdk from build log.

I HAVE EVEN TRIED TO ASK CHATGPT. It says same bullshit over and over again. "Go to Iron Source website download these ironsource-x.y.z.aar, adapter-x-y-z.aar, mediationsdk-x.y.z.aar" THERE IS NO SUCH THING. Why did you make this ads thing so hard??? I AM FORCED TO USE LEVELPLAY to show ads, because Unity Ads Legacy's banner ads are not showing on the Android device (CHATGPT said to me, it is because A BUG on Ads Legacy package (HAHAHAHA))

Thank you for everything guys.

EDIT: I am using Unity 6000.044f1 LTS.


Solution

  • I have found out how to fix the problem. This is for everyone who wants use Ads Mediation package.

    1- Install Ads Mediation from Unity package manager.

    2- When installing finished, there will be a pop up that asks you to install "Mobile Dependency Manager". Click to NO. This is important.

    3- Check your Assets folder if there are any "Mobile Dependency Manager" or "External Dependency Manager". If you find, delete all folders.

    4- Go to Assets/Plugins/Android folder. Delete everything on it.

    5- Go back to Unity. Open the package manager. Install the External Dependency Manager from the plus icon that is on the left corner. Select "Install package git URL". Paste this URL:

    https://github.com/googlesamples/unity-jar-resolver.git?path=upm
    It is going to install, and you will see the package on package manager when It is finished.

    6- Close package manager. Click Assets -> External Dependency Manager -> Android Resolver -> Force Resolve tab. It will make force resolve and you should see a pop up that says something like "Resolve Succeded".

    7- You can now build your project. The problem will be solved.