0
\$\begingroup\$

Ive been stuck with this problem for the last few days and really need some assistance.

Iv created an android app and im trying to set up google play services as i want to use the leader board etc..

I downloaded and imported the latest plugin "GooglePlayGamesPlugin-0.9.50 " no errors during the import.

I then go to assests/ play service resolver/android/force resolve and run that.

After running I end up with the following error:



Resolution failed

Failed to fetch the following dependencies:

com.google.games:gpgs-plugin-support:0.9.50

UnityEngine.Debug:LogError(Object)

Google.Logger:Log(String, LogLevel)

GooglePlayServices.PlayServicesResolver:Log(String, LogLevel)

GooglePlayServices.ResolverVer1_1:LogMissingDependenciesError(List`1)

GooglePlayServices.c_AnonStorey18:<>m_26(List`1)

GooglePlayServices.c_AnonStorey14:<>m_1F(Result)

GooglePlayServices.c_AnonStorey15:<>m_28()

GooglePlayServices.PlayServicesResolver:PumpUpdateQueue()

UnityEditor.EditorApplication:Internal_CallUpdateFunctions()



If i ignore the error and complie the app it works fine but does not connect to the google service. I can publish and use the app without crashes etc but i cant log on to google or view leaderboards.

Can any one assist me as im really desperate to get this up and running.

Im using : unity 2017.1.1f1 personal 64bit

Windows 10 64 bit

jdk1.8.0_162

\$\endgroup\$
  • \$\begingroup\$ Have you actually downloaded all libraries with the android sdk tool? It probably can't find the AAR packs. After you've done that you need to add those aar packs to your project so it's build with the apk. Assuming you're talking about this plugin you can let the plugin pull the AAR packs to your project. But you must download the repo with the android sdk manager \$\endgroup\$ – Sidar Mar 4 '18 at 22:23
  • \$\begingroup\$ Hi, I've downloaded all libraries and I even updated my unity to unity 2017.3.1f1. this still did not solve my issue. I still get a resolution failed. \$\endgroup\$ – M-Corp Mar 5 '18 at 10:29
  • \$\begingroup\$ Did you pull the AAR packs trough the plugin? Just downloading them doesn't do anything. The GooglePlayGamesPlugin has a feature to pull the AAR packs that you have defined in your GooglePlay script. There is an example code for that. You could just copy it over and activate it. Right click in your project view and use GooglePlayGamesPlugin submenu to pull the AAR packs to your plugin folder. \$\endgroup\$ – Sidar Mar 5 '18 at 17:27
  • \$\begingroup\$ I don't seem to be following. this is what I have done. - i downloaded the GooglePlayGamesPlugin zip from github the same as the link you have up. I extracted the files. i went into unity and i clicked on import package\custom package. I then did a force resolve. that when i get this error. Am i supposed to copy anything to the project or assets folder ? \$\endgroup\$ – M-Corp Mar 5 '18 at 18:51
  • \$\begingroup\$ It's been a year since I've done this so I conflated two things. What you also need is github.com/googlesamples/unity-jar-resolver, this will pull in the AAR packs you need then you should be able to play fine. Look at the example script on how to use it. Define the services ( and version ) you want and the jar resolver pulls in the aar packs. Or if you want to do it manually go into your android SDK folder find the AAR packs yourself and add them to your project. The jar resolver however also pulls additional AAR packs if it needs any. \$\endgroup\$ – Sidar Mar 5 '18 at 21:56
1
\$\begingroup\$

There seems to be an issue with the resolver, I "solved" this by disabling auto resolve in the resolver and having android studio download the packages from me then copying the aar files to the Android directory in my unity project.

not the cleanest way but it worked

they get downloaded to sdk\extras\google\m2repository\com\google\android\gms\ see which ones you need and copy the aar file into your android project

\$\endgroup\$
1
\$\begingroup\$

Open you GooglePlayGamesPluginDependencies.xml file and make sure that path mentioned for "com.google.games:gpgs-plugin-support:x.x.xx" exists and is valid.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.