Googleads-mobile-unity: Error message about appcompat-v7:23.1.0+

Created on 23 Feb 2016  路  9Comments  路  Source: googleads/googleads-mobile-unity

Having these versions.

  • Google Play Services: 8.4.0
  • Google Mobile Ads Unity Plugin: 3.0.1

Unity shows me this error, and I already updated everything in Android SKD Manager:

Google.JarResolver.ResolutionException: Cannot find candidate artifact for com.android.support:appcompat-v7:23.1.0+
at Google.JarResolver.PlayServicesSupport.DependOn (System.String group, System.String artifact, System.String version) [0x00000] in :0
at AdMobDependencies..cctor () [0x00039] in /Users/rgap/Desktop/googleads-mobile-unity/samples/HelloWorld/Assets/PlayServicesResolver/Editor/AdMobDependencies.cs:21
UnityEditor.EditorAssemblies:SetLoadedEditorAssemblies(Assembly[])

support question

Most helpful comment

I had the same problem, and I solved installing the "Local Maven repository for Support Libraries" package from the Android SDK Manager.

All 9 comments

Hi there,

The App compat v7 resource comes from the Android support repository in SDK manager. Please also make sure you have that up to date as well.

It is up to date and I tested it in the sample project

Did the JarResolver library copy AARs for the remaining Google Play Services libraries into your 'Plugins/Android' directory?

I ended up putting a preprocessor flag around the whole static method in the PlayServicesResolver/Editor/AdMobDependencies.cs file, because it seems relevant only to the Android build, especially if you are building out for ios only:

/// Initializes static members of the class.
static AdMobDependencies()
{
    #if UNITY_ANDROID
    PlayServicesSupport svcSupport =
        PlayServicesSupport.CreateInstance(PluginName, EditorPrefs.GetString("AndroidSdkRoot"),
                "ProjectSettings");

    svcSupport.DependOn("com.google.android.gms", "play-services-ads", "LATEST");

    // Marshmallow permissions requires app-compat.
    svcSupport.DependOn("com.android.support", "appcompat-v7", "23.1.0+");
    #endif
}

Do you have the Android SDK installed on your machine?

I had the same problem, and I solved installing the "Local Maven repository for Support Libraries" package from the Android SDK Manager.

@gsanseverino Also had to install "Local Maven...", thanks for the solution!

I have sdk, i have Local Maven, still same error massage.

The latest version of the plugin (v3.1.0) will prompt you to download any Google Play services dependencies or Android SDK build tools that are not present on your development machine.

Was this page helpful?
0 / 5 - 0 ratings