- Home /
Google Play Games plugin introduces -Unable to find the Android SDK manager tool. - error
Hello everyone,
Trying to wrap up my first app and I'm looking for some advice.
In an effort to implement a Leaderboards plugin I purchased from the asset store I have recently gone through these steps:
Installed Google Play Games plugin from Github.
Created a google developer account that gave me access to the Console.
Created a signed APK that the aforementioned console was happy with.
Successfully completed the setup process for the Google Play Games plugin from Unity.
Now I'm getting the following errors:
Resolver version is now: 10101
ERROR: Unable to find dependency com.google.android.gms play-services-games 9+ in ($SDK\extras\android\m2repository
>> auth
>> support
Unable to find the Android SDK manager tool. Required Android packages (extra-google-m2repository, extra-android-m2repository) can not be installed. Android SDK path not set. Set the Android SDK property using the Unity "Edit > Preferences > External Tools" menu option on Windows or the "Unity > Preferences > External Tools" menu option on OSX. Alternatively, set the ANDROID_HOME environment variable
I installed Android Studio probably about a year ago. The path to the android SDK and JDK have been set and working fine (up until now at least.) I think I need to access this SDK manager tool but I don't know how...
Q: Do I need to install something else? perhaps I need an update of sorts? Or maybe if I re-installed something? or D:(?)
I'm trying all this on a barebones "test" project so I haven't even introduced the Leaderboards Asset yet.
That's about all the relevant info I can think of ATM. Thank you for reading; any feedback would be greatly appreciated!
Best regards, Don
Answer by kleber-swf · Oct 28, 2016 at 05:00 PM
A good start point is:
https://docs.unity3d.com/Manual/android-sdksetup.html
It seems that your Android SDK isn't installed or properly configured in Unity. The SDK Manager is a program where you manage the installation of sdks and their versions related to Android development.
For me, I usually install the android SDK at: C:\devel\android-sdk, so the SDK Manager is at C:\devel\android-sdk\SDK Manager.exe. In Unity, The Android SDK path inside Preferences > External Tools must be root folder of SDK's installation (in my case C:\devel\android-sdk)
After the installation/update of everything you need, you need to setup the Google Play Services pasting a xml you copied from your Google Play Console in Window > Google Play Games > Setup > Android Setup (make sure you have no compiler errors, otherwise the menu will not show up). This is explained right here:
https://github.com/playgameservices/play-games-plugin-for-unity#configure-your-game
The steps are basically:
install the SDK Manager
install latest Android Platform, Platform Tools and USB drivers
configure Unity to point to the Android SDK installation folder
install the Google Services plugin
configure the plugin
Let me know if this worked for you.
Thank you for the response @kleber-swf !
Right before I saw your answer, I decided to go ahead and reinstall Android Studio (bundle with the SD$$anonymous$$) and changed the path in the Preferences>External Tools.
That took care of the main SD$$anonymous$$ manager Tool error. However I still get a couple more warnings about:
Resolver version is now: 10101
WARNING: No compatible versions of com.android.support:support-v4 required by...
WARNING: No compatible versions of com.android.support:support-annotations required by ...
Thanks to your post I'm sure I'll have those straightened out soon as well:)
I appreciate the feedback; I'll come back and accept the answer as correct once I'm in the clear;|
I don't know what those warnings means, but I'm developing an Android game with Google Play Services and they are here too. But so far no harm. All achievements and scoreboards are working fine :)
have you been able to build to a device? I just tried it and I'm getting a "UnityException: Resource compilation failed!" After a quick search I'm thinking I might need to make sure I get the latest JD$$anonymous$$ too. [ edit-with the corresponding path in Preferences>Tools of-course ]
Sounds like you're using the Google Player Services JAR resolver. In your Android SD$$anonymous$$ manager you'll also want to make sure to install the repositories for Android Support Repository and Google Repository, That will take care of Warning #2 and #3. #1 is just info telling you what har resolver version is running.
It's weird. I checked and it seems that both are installed in my SD$$anonymous$$ $$anonymous$$anager. But the same warnings continue to appear to me.
Answer by donimation · Nov 03, 2016 at 05:11 PM
In addition to the steps mentioned above I had to re-install the latest JDK (and edit the path pointing to it in Preferences>External Tools) I think runing the Assets>PlayServices Resolver>Android Resolver>Resolve Client Jars helped fix some of the Warning Logs. Unstuck, for now:)
Thanks again @kleber-swf and @Naphier for helping me solve this.
Answer by PointyPigheadGames · Jan 04, 2017 at 08:35 PM
I just installed the 2 packages manually. Open your SDK Manager, and install Android Support Repository and Google Repository. This should fix your problem.
Answer by ecequalsm2 · Mar 13, 2018 at 05:18 PM
I'm having a similar issue. But I'm using a mac, which has proven to be a pain when it comes to developing for Android. but I'm getting these errors:
Error 1: Gradle failed to fetch dependencies.
Failed to run '/Users/milliemilagne/Documents/EC=M2 Games/Spacey Boy/Spacey Boy/Temp/PlayServicesResolverGradle/gradlew -b "/Users/milliemilagne/Documents/EC=M2 Games/Spacey Boy/Spacey Boy/Temp/PlayServicesResolverGradle/PlayServicesResolver.scripts.download_artifacts.gradle" --no-daemon "-PANDROID_HOME=/Users/milliemilagne/GameDev/Android/sdk" "-PTARGET_DIR=/Users/milliemilagne/Documents/EC=M2 Games/Spacey Boy/Spacey Boy/Assets/Plugins/Android" "-PMAVEN_REPOS=https://maven.google.com;file:////Users/milliemilagne/Documents/EC=M2%20Games/Spacey%20Boy/Spacey%20Boy/Assets/EasyMobile/Plugins/Android/m2repository" "-PPACKAGES_TO_COPY=com.google.android.gms:play-services-games:10+;com.google.android.gms:play-services-nearby:10+;com.google.android.gms:play-services-auth:10+;com.google.android.gms:play-services-gcm:+;com.google.android.gms:play-services-location:+;com.android.support:customtabs:+;com.android.support:support-v4:+;com.android.support:support-v4:22.1.+;com.sglib.easymobile:easy-mobile:+"' stdout:
stderr:
FAILURE: Build failed with an exception.
Where: Build file '/Users/milliemilagne/Documents/EC=M2 Games/Spacey Boy/Spacey Boy/Temp/PlayServicesResolverGradle/PlayServicesResolver.scripts.download_artifacts.gradle' line: 127
What went wrong: A problem occurred evaluating root project 'PlayServicesResolverGradle'.
For input string: "0-alpha1"
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.
Get more help at https://help.gradle.org
BUILD FAILED in 3s
exit code: 1
UnityEngine.Debug:LogError(Object) Google.Logger:Log(String, LogLevel) GooglePlayServices.PlayServicesResolver:Log(String, LogLevel) GooglePlayServices.c_AnonStorey14:<>m1F(Result) GooglePlayServices.cAnonStorey15:<>m_28() GooglePlayServices.PlayServicesResolver:PumpUpdateQueue() UnityEditor.EditorApplication:Internal_CallUpdateFunctions()
Error 2: Unable to find the Android SDK manager tool.
The following Required Android packages cannot be installed: extras;google;m2repository extras;android;m2repository
UnityEngine.Debug:LogError(Object) Google.Logger:Log(String, LogLevel) GooglePlayServices.PlayServicesResolver:Log(String, LogLevel) GooglePlayServices.c_AnonStorey19:<>m27(IAndroidSdkManager) GooglePlayServices.AndroidSdkManager:CreateFailed(Action`1) GooglePlayServices.AndroidSdkManager:Create(String, Action`1) GooglePlayServices.ResolverVer1_1:InstallAndroidSdkPackagesAndResolve(String, HashSet`1, Dictionary`2, Action) GooglePlayServices.cAnonStorey18:<>m26(List`1) GooglePlayServices.cAnonStorey14:<>m1F(Result) GooglePlayServices.cAnonStorey15:<>m_28() GooglePlayServices.PlayServicesResolver:PumpUpdateQueue() UnityEditor.EditorApplication:Internal_CallUpdateFunctions()
Any suggestions are greatly appreciated.
I'm having the exact same issue. Were you able to fix it?
Currently running Unity 2017.4f1 Android Studio 3.1.2 with SD$$anonymous$$ Platforms 8.0 and 8.1 JD$$anonymous$$1.8.0_172
Any help would be greatly appreciated.
For me helped, updating a used SD$$anonymous$$ (OneSignal).
Answer by ianholing · Jun 23, 2017 at 05:46 PM
Try to use new Gradle Build tool in Unity (Works for me)