I’m currently working on getting Google Play’s API put into my game. But I’m having some trouble getting it to work and making an android build with it in the project. This is the first Error I get when the project first loads up:
Google.JarResolver.ResolutionException: Cannot find candidate artifact for com.android.support:support-v4:24.0.0
at Google.JarResolver.PlayServicesSupport.GetDependencies (Google.JarResolver.Dependency dep, System.Collections.Generic.List`1 repoPaths) [0x00000] in :0
at Google.JarResolver.PlayServicesSupport.GetDependencies (Google.JarResolver.Dependency dep) [0x00000] in :0
at Google.JarResolver.PlayServicesSupport.ResolveDependencies (Boolean useLatest, System.String destDirectory, Google.JarResolver.ExplodeAar explodeAar) [0x00000] in :0
at GooglePlayServices.ResolverVer1_1.DoResolutionNoAndroidPackageChecks (Google.JarResolver.PlayServicesSupport svcSupport, System.String destinationDirectory, Google.JarResolver.OverwriteConfirmation handleOverwriteConfirmation) [0x00000] in :0
UnityEngine.Debug:LogError(Object)
GooglePlayServices.ResolverVer1_1:smile:oResolutionNoAndroidPackageChecks(PlayServicesSupport, String, OverwriteConfirmation)
GooglePlayServices.c__AnonStorey5:<>m__8()
GooglePlayServices.ResolverVer1_1:smile:oResolution(PlayServicesSupport, String, OverwriteConfirmation, Action)
GooglePlayServices.PlayServicesResolver:Resolve(Action)
GooglePlayServices.PlayServicesResolver:AutoResolve()
UnityEditor.EditorApplication:Internal_CallUpdateFunctions()
And I’m also getting this error too:
CommandInvokationFailure: Failed to re-package resources.
/Users/nathanmeier/Library/Android/sdk/build-tools/23.0.2/aapt package --auto-add-overlay -v -f -m -J “gen” -M “AndroidManifest.xml” -S “res” -I “/Users/nathanmeier/Library/Android/sdk/platforms/android-23/android.jar” -F bin/resources.ap_ --extra-packages com.google.example.games.mainlibproj:com.unity3d.ads -S “/Users/nathanmeier/Documents/Video Game Projects/Fart Man (Web)/Temp/StagingArea/android-libraries/unity-ads/res”
stderr[
AndroidManifest.xml:19: error: Error: No resource found that matches the given name (at ‘value’ with value ’ @Integer /google_play_services_version’).
]
stdout[
Configurations:
(default)
Files:
AndroidManifest.xml
Src: () AndroidManifest.xml
Resource Dirs:
Including resources from package: /Users/nathanmeier/Library/Android/sdk/platforms/android-23/android.jar
applyFileOverlay for drawable
trying overlaySet Key=app_banner.png
trying overlaySet Key=app_icon.png
applyFileOverlay for layout
applyFileOverlay for anim
applyFileOverlay for animator
applyFileOverlay for interpolator
applyFileOverlay for transition
applyFileOverlay for xml
applyFileOverlay for raw
applyFileOverlay for color
applyFileOverlay for menu
applyFileOverlay for mipmap
Processing image: res/drawable-xhdpi/app_banner.png
Processing image: res/drawable-ldpi/app_icon.png
Processing image: res/drawable-mdpi/app_icon.png
Processing image: res/drawable-hdpi/app_icon.png
(processed image res/drawable-ldpi/app_icon.png: 98% size of source)
Processing image: res/drawable-xhdpi/app_icon.png
(processed image res/drawable-mdpi/app_icon.png: 98% size of source)
Processing image: res/drawable-xxhdpi/app_icon.png
(processed image res/drawable-hdpi/app_icon.png: 96% size of source)
Processing image: res/drawable-xxxhdpi/app_icon.png
(processed image res/drawable-xhdpi/app_icon.png: 97% size of source)
(processed image res/drawable-xhdpi/app_banner.png: 93% size of source)
(processed image res/drawable-xxhdpi/app_icon.png: 96% size of source)
(processed image res/drawable-xxxhdpi/app_icon.png: 96% size of source)
(new resource id app_banner from xhdpi-v4/drawable/app_banner.png #generated )
(new resource id app_icon from ldpi-v4/drawable/app_icon.png #generated )
(new resource id app_icon from mdpi-v4/drawable/app_icon.png #generated )
(new resource id app_icon from hdpi-v4/drawable/app_icon.png #generated )
(new resource id app_icon from xhdpi-v4/drawable/app_icon.png #generated )
(new resource id app_icon from xxhdpi-v4/drawable/app_icon.png #generated )
(new resource id app_icon from xxxhdpi-v4/drawable/app_icon.png #generated )
]
exit code: 1
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.PostProcessor.Tasks.TasksCommon.Exec (System.String command, System.String args, System.String workingdir, System.String errorMsg, Int32 retriesOnFailure)
UnityEditor.HostView:OnGUI()
I’ve put in the android NPK-r10e and updated the SDK with the latest version. But it still seems to be giving me trouble and I don’t know what to do. Please help!
It looks like the “Resolver”, which is a component used by different plugins that require Google play services, failed to perform its job, which is to resolve Google play services libraries.
The 2nd error also suggests the same - it fails to find a particular resource that is usually defined in one of the Google play services libraries.
You can try updating everything using the “SDK Manager” from your Android SDK folder, then try to return to Unity and let it resolve the libraries again (Assets → Google Play → Resolve client jars).
NOTE: I provide professional assistance with exactly this kind of cases. If you’re not able to resolve the issue yourself, please feel free to contact me via the link in my signature below.
I’ve tried updating the Android SDK using Android Studio and then letting Unity resolve the libraries under Assets → Play Services Resolver → Android Resolver → Resolve Client Jars. There doesn’t seem to be an option specifically named “Google Play” under Assets.
I’m still getting some errors though, this is what I’m now getting:
CommandInvokationFailure: Unable to list target platforms. Please make sure the android sdk path is correct. See the Console for more details.
/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/bin/java -Xmx2048M -Dcom.android.sdkmanager.toolsdir=“/Users/nathanmeier/Library/Android/sdk/tools” -Dfile.encoding=UTF8 -jar “/Applications/Unity/PlaybackEngines/AndroidPlayer/Tools/sdktools.jar” -
stderr[
Error:Invalid command android
]
stdout[
]
exit code: 64
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.AndroidSDKTools.RunCommandInternal (System.String javaExe, System.String sdkToolsDir, System.String[ ] sdkToolCommand, Int32 memoryMB, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.AndroidSDKTools.RunCommandSafe (System.String javaExe, System.String sdkToolsDir, System.String[ ] sdkToolCommand, Int32 memoryMB, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.HostView:OnGUI()
Error building Player: CommandInvokationFailure: Unable to list target platforms. Please make sure the android sdk path is correct. See the Console for more details.
/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/bin/java -Xmx2048M -Dcom.android.sdkmanager.toolsdir=“/Users/nathanmeier/Library/Android/sdk/tools” -Dfile.encoding=UTF8 -jar “/Applications/Unity/PlaybackEngines/AndroidPlayer/Tools/sdktools.jar” -
stderr[
Error:Invalid command android
]
stdout[
]
exit code: 64
Any ideas on to what these problems are?
Yes this is a known issue that otgers have reported.
See this link with details on how to fix it: unity3d 5.5.0fx Unable to list target platforms error - Unity Engine - Unity Discussions
That seems to help. But now I’m getting more errors. This is what it’s now saying:
Error: [Temp/StagingArea/AndroidManifest-main.xml:12, /Users/nathanmeier/Documents/Video Game Projects/Fart Man (Web)/Temp/StagingArea/android-libraries/play-services-auth-10.2.1/AndroidManifest.xml:2] Main manifest has but library uses minSdkVersion=‘14’
UnityEditor.HostView:OnGUI()
and also:
CommandInvokationFailure: Unable to merge android manifests. See the Console for more details.
/Library/Java/JavaVirtualMachines/jdk1.7.0_79.jdk/Contents/Home/bin/java -Xmx2048M -Dcom.android.sdkmanager.toolsdir=“/Users/nathanmeier/Library/Android/sdk/tools” -Dfile.encoding=UTF8 -jar “/Applications/Unity/PlaybackEngines/AndroidPlayer/Tools/sdktools.jar” -
stderr[
Error: [Temp/StagingArea/AndroidManifest-main.xml:12, /Users/nathanmeier/Documents/Video Game Projects/Fart Man (Web)/Temp/StagingArea/android-libraries/play-services-auth-10.2.1/AndroidManifest.xml:2] Main manifest has but library uses minSdkVersion=‘14’
Error: [Temp/StagingArea/AndroidManifest-main.xml:12, /Users/nathanmeier/Documents/Video Game Projects/Fart Man (Web)/Temp/StagingArea/android-libraries/play-services-auth-base-10.2.1/AndroidManifest.xml:3] Main manifest has but library uses minSdkVersion=‘14’
Error: [Temp/StagingArea/AndroidManifest-main.xml:12, /Users/nathanmeier/Documents/Video Game Projects/Fart Man (Web)/Temp/StagingArea/android-libraries/play-services-base-10.2.1/AndroidManifest.xml:2] Main manifest has but library uses minSdkVersion=‘14’
Error: [Temp/StagingArea/AndroidManifest-main.xml:12, /Users/nathanmeier/Documents/Video Game Projects/Fart Man (Web)/Temp/StagingArea/android-libraries/play-services-basement-10.2.1/AndroidManifest.xml:2] Main manifest has but library uses minSdkVersion=‘14’
Error: [Temp/StagingArea/AndroidManifest-main.xml:12, /Users/nathanmeier/Documents/Video Game Projects/Fart Man (Web)/Temp/StagingArea/android-libraries/play-services-drive-10.2.1/AndroidManifest.xml:2] Main manifest has but library uses minSdkVersion=‘14’
Error: [Temp/StagingArea/AndroidManifest-main.xml:12, /Users/nathanmeier/Documents/Video Game Projects/Fart Man (Web)/Temp/StagingArea/android-libraries/play-services-games-10.2.1/AndroidManifest.xml:2] Main manifest has but library uses minSdkVersion=‘14’
Error: [Temp/StagingArea/AndroidManifest-main.xml:12, /Users/nathanmeier/Documents/Video Game Projects/Fart Man (Web)/Temp/StagingArea/android-libraries/play-services-nearby-10.2.1/AndroidManifest.xml:2] Main manifest has but library uses minSdkVersion=‘14’
Error: [Temp/StagingArea/AndroidManifest-main.xml:12, /Users/nathanmeier/Documents/Video Game Projects/Fart Man (Web)/Temp/StagingArea/android-libraries/play-services-tasks-10.2.1/AndroidManifest.xml:2] Main manifest has but library uses minSdkVersion=‘14’
]
stdout[
[Temp/StagingArea/AndroidManifest-main.xml, /Users/nathanmeier/Documents/Video Game Projects/Fart Man (Web)/Temp/StagingArea/android-libraries/play-services-basement-10.2.1/AndroidManifest.xml:5] Skipping identical /manifest/application/meta-data[@name=com.google.android.gms.version] element.
]
exit code: 1
UnityEditor.Android.Command.Run (System.Diagnostics.ProcessStartInfo psi, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.AndroidSDKTools.RunCommandInternal (System.String javaExe, System.String sdkToolsDir, System.String[ ] sdkToolCommand, Int32 memoryMB, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.Android.AndroidSDKTools.RunCommandSafe (System.String javaExe, System.String sdkToolsDir, System.String[ ] sdkToolCommand, Int32 memoryMB, System.String workingdir, UnityEditor.Android.WaitingForProcessToExit waitingForProcessToExit, System.String errorMsg)
UnityEditor.HostView:OnGUI()
Try changing your minimal android supported version to 14
How do I go about changing that? I went into the manifests and tried changing minSDKVersion to 14, but it didn’t seem to do anything and I got the same error.
I think I found the right manifest, I change the number to 14. but the build still fails, I get the same errors and the number I tweaked in the main android manifest gets reset back to 9.
You should change that value in the main manifest… or through player settings
I changed it in the player settings and that seems to help. I’m still getting errors but it’s alot less.
This is what I’m getting in the console window:
Failed to compile resources with the following parameters:
-bootclasspath “/Users/nathanmeier/Library/Android/sdk/platforms/android-25/android.jar” -d “/Users/nathanmeier/Documents/Video Game Projects/Fart Man (Web)/Temp/StagingArea/bin/classes” -source 1.6 -target 1.6 -encoding UTF-8 “android/support/v4/R.java” “com/GroovyVideoGames/FartMan/R.java” “com/google/android/gms/R.java” “com/google/android/gms/auth/R.java” “com/google/android/gms/auth/api/R.java” “com/google/android/gms/base/R.java” “com/google/android/gms/drive/R.java” “com/google/android/gms/games/R.java” “com/google/android/gms/nearby/R.java” “com/google/android/gms/tasks/R.java” “com/google/example/games/mainlibproj/R.java” “com/unity3d/ads/R.java”
warning: /Users/nathanmeier/Library/Android/sdk/platforms/android-25/android.jar(java/lang/Object.class): major version 52 is newer than 51, the highest major version supported by this compiler.
It is recommended that the compiler be upgraded.
warning: /Users/nathanmeier/Library/Android/sdk/platforms/android-25/android.jar(java/lang/AutoCloseable.class): major version 52 is newer than 51, the highest major version supported by this compiler.
It is recommended that the compiler be upgraded.
2 warnings
UnityEditor.HostView:OnGUI()
UnityException: Resource compilation failed!
Failed to recompile android resource files. See the Console for details.
UnityEditor.Android.PostProcessor.CancelPostProcess.AbortBuild (System.String title, System.String message, System.Exception ex)
UnityEditor.Android.PostProcessor.CancelPostProcess.AbortBuild (System.String title, System.String message)
UnityEditor.Android.PostProcessor.CancelPostProcess.AbortBuildPointToConsole (System.String title, System.String message)
UnityEditor.Android.PostProcessor.Tasks.BuildResources.CompileResources (UnityEditor.Android.PostProcessor.PostProcessorContext context)
UnityEditor.Android.PostProcessor.Tasks.BuildResources.Execute (UnityEditor.Android.PostProcessor.PostProcessorContext context)
UnityEditor.Android.PostProcessor.PostProcessRunner.RunAllTasks (UnityEditor.Android.PostProcessor.PostProcessorContext context)
UnityEditor.Android.PostProcessAndroidPlayer.PostProcess (BuildTarget target, System.String stagingAreaData, System.String stagingArea, System.String playerPackage, System.String installPath, System.String companyName, System.String productName, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry)
UnityEditor.Android.AndroidBuildPostprocessor.PostProcess (BuildPostProcessArgs args)
UnityEditor.PostprocessBuildPlayer.Postprocess (BuildTarget target, System.String installPath, System.String companyName, System.String productName, Int32 width, Int32 height, System.String downloadWebplayerUrl, System.String manualDownloadWebplayerUrl, BuildOptions options, UnityEditor.RuntimeClassRegistry usedClassRegistry, UnityEditor.BuildReporting.BuildReport report) (at /Users/builduser/buildslave/unity/build/Editor/Mono/BuildPipeline/PostprocessBuildPlayer.cs:186)
UnityEditor.HostView:OnGUI()
You should install JDK 8, and then point your Unity installation to use that (under preferences → external tools)
that fixed it!!! Thanks so much for your help, I couldn’t have done it without you.
I know I didn’t pay for your services. But if it’s okay with you I can leave you a five-star review on your fiverr page.
Great. I don’t think you can leave a review without an order
Hi liortal, I’m getting the similar error regarding the “Resolver” issue. But my is cannot find the play-service-basement[10.2.4]
Below is the error log:
ResolutionException: Cannot find candidate artifact for com.google.android.gms:play-services-basement:[10.2.4]
Google.JarResolver.PlayServicesSupport.GetDependencies (Google.JarResolver.Dependency dep, System.Collections.Generic.List1 repoPaths) Google.JarResolver.PlayServicesSupport.GetTransitiveDependencies (System.Collections.Generic.Dictionary2 dependencies, System.Collections.Generic.List1 repoPaths) Google.JarResolver.PlayServicesSupport.FindMissingDependencyPaths (System.String destinationDirectory, System.Collections.Generic.Dictionary2& dependencyPaths, Google.JarResolver.ExplodeAar explodeAar)
GooglePlayServices.ResolverVer1_1.DoResolution (Google.JarResolver.PlayServicesSupport svcSupport, System.String destinationDirectory, Google.JarResolver.OverwriteConfirmation handleOverwriteConfirmation, System.Action resolutionComplete)
GooglePlayServices.PlayServicesResolver.Resolve (System.Action resolutionComplete)
GooglePlayServices.PlayServicesResolver.MenuResolve ()
I have updated latest version of Android Support Repository and Google Repository in Android SDK manager.
But the error still there
Please help me.
Thanks.
@Technical_Techninier did you resolve the issue? what play-services-xxx files do you have in your project right now ?
i’m get this error too…ple help me out…
ResolutionException: Cannot find candidate artifact for com.android.support:support-v4:24.0.0
Google.JarResolver.PlayServicesSupport.GetDependencies (Google.JarResolver.Dependency dep, System.Collections.Generic.List1 repoPaths) Google.JarResolver.PlayServicesSupport.GetTransitiveDependencies (System.Collections.Generic.Dictionary2 dependencies, System.Collections.Generic.List1 repoPaths) Google.JarResolver.PlayServicesSupport.FindMissingDependencyPaths (System.String destinationDirectory, System.Collections.Generic.Dictionary2& dependencyPaths, Google.JarResolver.ExplodeAar explodeAar)
GooglePlayServices.ResolverVer1_1.DoResolution (Google.JarResolver.PlayServicesSupport svcSupport, System.String destinationDirectory, Google.JarResolver.OverwriteConfirmation handleOverwriteConfirmation, System.Action resolutionComplete)
GooglePlayServices.PlayServicesResolver.Resolve (System.Action resolutionComplete)
GooglePlayServices.PlayServicesResolver.MenuResolve ()
i’m using google play service 49