Search Unity

Discussion For those who have gotten Levelplay to work on Android, please share your dependency resolver setup

Discussion in 'LevelPlay' started by valonsoft, Mar 3, 2023.

  1. valonsoft

    valonsoft

    Joined:
    May 22, 2016
    Posts:
    28
    I have concluded after wasting countless development time that Ironsource's LevelPlay simply does not work on default Unity and external dependency resolver settings — at least for Android on Unity 2021 LTS and Unity 2022.2.

    From what I noticed, most of the error comes from dependency resolver not properly resolving IronSource's SDK. For example:
    1) Not enabling both custom gradle property and custom main gradle template options in publishing settings results in dependency resolver errors
    2)Not adding "android.useAndroidX=true" and "android.enableJetifier=true" to gradle.properties file leads to grade build errors
    3) Not using the step
    External Dependency Resolver > Delete resolved libraries
    Also results in gradle build errors but using this step leads to successful build but ads not working due to some missing SDK files (eg Lcom/ironsource/mediationsdk/sdk/InitializationListener )

    Please anyone that has Ironsource working and showing ads should please explain how they got it to work
     
  2. PapayaLimon

    PapayaLimon

    Joined:
    Aug 22, 2018
    Posts:
    85
    As far as i have tested, Iron Source don't work on 2022, just in 2021. When i try to update it disappeared. I think you need to get back to 2021 :(
     
  3. valonsoft

    valonsoft

    Joined:
    May 22, 2016
    Posts:
    28
    Did you make any change to the gradle Fikes to make it work?
     
  4. PapayaLimon

    PapayaLimon

    Joined:
    Aug 22, 2018
    Posts:
    85
    Yes, with the Gradle files i get it to work, but if i change to 2022, ads suddenly won't appear. :(
     
  5. jpom001

    jpom001

    Joined:
    Dec 3, 2020
    Posts:
    69
    I have got it to work, take a look at my older posts to see the issues.
    Take note of the gradlesettings file I had to change, mod said I shouldnt do this but it wont pull down the right libs without this change

    Code (CSharp):
    1.  
    2. pluginManagement {
    3.     repositories {
    4.         **ARTIFACTORYREPOSITORY**
    5.         gradlePluginPortal()
    6.         google()
    7.         mavenCentral()
    8.     }
    9. }
    10.  
    11. include ':launcher', ':unityLibrary'
    12. **INCLUDES**
    13. /*
    14. dependencyResolutionManagement {
    15.     repositoriesMode.set(RepositoriesMode.PREFER_SETTINGS)
    16.     repositories {
    17.         **ARTIFACTORYREPOSITORY**
    18.         google()
    19.         mavenCentral()
    20.         flatDir {
    21.             dirs "${project(':unityLibrary').projectDir}/libs"
    22.         }
    23.     }
    24. }
    25. */