3

I'm trying to integrate Google Analytics in my Unity game. I've downloaded and installed the latest unitypackage.

In Unity after clicking on Google Analytics > Setup > Install google-play-services_lib I get this error:

enter image description here

I've installed Google Play Services in Android SDK manager but it does not install the lib. Even the description of the package says it only installs JavaDoc and Sample code, no library:

GooglePlayServices installation screenshot

So the problem is that in the /extras/google/google_play_services/ folder there is no libproject subfolder at all. Only JavaDoc and Samples folders.

I've read the documentation (tab OTHER because I'm not using neither Android Studio nor Eclipse), followed the instructions step by step and it just doesn't work. And my googling turned in vain. How can I install google play services lib?

Nika Kasradze
  • 2,834
  • 3
  • 25
  • 48
  • 1
    The latest version of google play services changed. Check this [Missing “/extras/google/google_play_services/libproject” folder after update to revision 30](http://stackoverflow.com/questions/37310684/missing-sdk-extras-google-google-play-services-libproject-folder-after-updat) – cinthiaro May 31 '16 at 22:53
  • thanks man, that's exactly what i was looking for. I've voted the question as duplicate, I don't wanna delete it because of SO regulations – Nika Kasradze Jun 01 '16 at 16:51

1 Answers1

0

Have you tried checking the Setting Up Google Play Services Document by Google?

For Android Studio:

  1. Open the build.gradle file inside your application module directory.
  2. Add a new build rule under dependencies for the latest version of play-services. For example:

apply plugin: 'com.android.application' ...

dependencies { compile 'com.google.android.gms:play-services:fp9.0.0' }

  1. Save the changes and click Sync Project with Gradle Files in the toolbar.

Note: If the number of method references in your app exceeds the 65K limit, your app may fail to compile. You may be able to mitigate this problem when compiling your app by specifying only the specific Google Play services APIs your app uses, instead of all of them. For information on how to do this, see Selectively compiling APIs into your executable.

For Eclipse with ADT:

  1. Copy the library project at <android-sdk>/extras/google/google_play_services/libproject/google-play-services_lib/ to the location where you maintain your Android app projects.
  2. Import the library project into your Eclipse workspace. Click File > Import, select Android > Existing Android Code into Workspace, and browse to the copy of the library project to import it.
  3. In your app project, reference Google Play services library project. See Referencing a Library Project for Eclipse for more information on how to do this.
  4. After you've added the Google Play services library as a dependency for your app project, open your app's manifest file and add the following tag as a child of the <application> element:

Android Enthusiast
  • 4,826
  • 2
  • 15
  • 30
  • 3
    Thanks for the reply. Yes I've read this. Probably I should have asked clearer - there is no `/extras/google/google_play_services/libproject/` folder at all. There are JavaDoc and Samples folders, but not libproject. I'll update the question. Thanks – Nika Kasradze May 22 '16 at 11:33