Unity3D: Stuck with Play Game Services plugin

Bananamarine game project has been progressing quite smoothly most of the time. But yesterday I ran into situation where Unity got stuck when I tried to add Google Play Game Services plugin to my project. I want to have at least leaderboard to my game, so leaving game services out was not an option.

Basically, plugin installation was successful, but after that all I got was a dialog window telling: "Getting list of installed Android packages". And tool was not responding anymore, even if I waited couple of hours.



I tried to search help for this problem using google, but there were not many hits to help me forward with this issue. Somehow I figured out that this was something related to the Android SDK version(s), so I decided to update my Android Studio installation first.

After Android Studio update I removed game services stuff from Unity project, updated SDK path to preferences, and tried to re-install plugin. But result was still the same: I got a dialog telling that Unity is collecting list of installed Android packages, and tool got stuck.

After some more searching I found this thread from Github: https://github.com/playgameservices/play-games-plugin-for-unity/issues/1529

Discussion was pointing out that some of the required SDKs were not necessarily installed by default with Android Studio setup, and updating SDK tools e.g. with SDK manager would be worth trying.

So I started Android Studio and tried what can be found there. And yes, at least Google Play Services SDK tools were totally missing from the installation. I selected it and some more SDK Platforms, and started update round.

When SDKs were updated I returned to Unity and removed game services plugin once again. Then I went to preferences and double-checked that SDK path is pointíng to the updated one. Now it was time to try plugin installation once more. And guess what: Now it seems to work perfectly!


I spent about 12 hours of time for exploring this issue, because I thought my setup was ok.

And what did I learn from this exercise? At least this: Keep your Android SDKs up-to-date, you moron! :)

-Jussi


Edit: It seems that after updating SDK I started to get "Unable to list target platforms" error messages, when trying to compile project to Android. The solution seems to be downgrading SDK Tools to version r25.2.3, as explained here: https://forum.unity3d.com/threads/unity3d-5-5-0fx-unable-to-list-target-platforms-error.446096/
I guess this same problem has been with Unity3D, Android Studio and Eclipse, to mention some.

Comments

Post a Comment

Popular posts from this blog

Unity3D mirror using camera and RenderTexture

Unity3D: Convert Seconds to hh:mm:ss Format

Construct 2: if-then-elseif-else statement