androidgradleadmobinmobi

Adding InMobi dependency with version like 'number.x x' into Android project gives error


I'm trying to integrate InMobi network into Admob. Documentation says to add such dependency

compile 'com.inmobi.monetization:inmobi-ads:7.x.x'

into build.gradle but it gives an error

Error:(27, 13) Failed to resolve: com.inmobi.monetization:inmobi-ads:7.x.x

Solution like answered. Every time you add a dependency make sure version is set explicitly by change the x with specific value.


Solution

  • put this in your gradle file the last two x.x are actually latest versions of library.

    compile 'com.inmobi.monetization:inmobi-ads:7.0.1'

    also add

      allprojects {
        repositories {
            jcenter()
        }
    }
    

    in project level build.gradle