private static void setupDependencies() { // Setup the resolver using reflection as the module may not be // available at compile time. Type playServicesSupport = Google.VersionHandler.FindClass( "Google.JarResolver", "Google.JarResolver.PlayServicesSupport"); if (playServicesSupport == null) { return; } object svcSupport = Google.VersionHandler.InvokeStaticMethod( playServicesSupport, "CreateInstance", new object[] { "FacebookUnitySDK", EditorPrefs.GetString("AndroidSdkRoot"), "ProjectSettings" }); // com.android.support:support-v4 Google.VersionHandler.InvokeInstanceMethod( svcSupport, "DependOn", new object[] { "com.android.support", "support-v4", "25.3.1" }, namedArgs: new Dictionary <string, object>() { { "packageIds", new string[] { "extra-android-m2repository" } } }); AndroidSupportLibraryResolver.addSupportLibraryDependency(svcSupport, "support-v4", "25.3.1"); AndroidSupportLibraryResolver.addSupportLibraryDependency(svcSupport, "appcompat-v7", "25.3.1"); AndroidSupportLibraryResolver.addSupportLibraryDependency(svcSupport, "cardview-v7", "25.3.1"); AndroidSupportLibraryResolver.addSupportLibraryDependency(svcSupport, "customtabs", "25.3.1"); }
static AndroidSupportLibraryResolver() { AndroidSupportLibraryResolver.setupDependencies(); }