Skip to content Skip to sidebar Skip to footer

Can't Use Google Play Services On Unity Java Plugin

I have a plugin for Unity that is written in Java. In this plugin I need to get the new Google Advertisement ID to do it, I have to add to the Manifest file:

Solution 1:

To fix this error, you have to copy the version.xml file from android-sdk/extras/google/google_play_services/libproject/google-play-services_lib/res/values/ into Assets/Plugins/Android/res/values/ your Unity project's folder.

Solution 2:

Don't copy all project into your Plugins/Android.

  1. Config file Manifest.xml to right information. Copy to Plugins/Android.

    <meta-dataandroid:name="com.google.android.gms.games.APP_ID"android:value="\ android app id " /><meta-dataandroid:name="com.google.android.gms.appstate.APP_ID"android:value="\ android app id " /><meta-dataandroid:name="com.google.android.gms.version"android:value="@integer/google_play_services_version" /><activityandroid:name="com.google.example.games.pluginsupport.SignInHelperActivity"
     />
  2. Copy Google play services jar -> to Plugins/Android

  3. Copy all res folder -> to Plugins/Android/res

Solution 3:

An updated simple solution:

Today, i have same issue. I noticed that, when i copy folder from android-sdk/extras/google/google_play_services/libproject/ named google-play-services_lib ; there is already this folder in Assets/Plugins/Android on unity. And name of the copied folder is to be goole-play-services_lib 1.

So i only deleted this folder, and it is working fine.

Solution 4:

You need recent Google Play Services library project linked to your project, so during build time all resources from the project will also be available. You definitely got older library because google_play_services_version was just introduced recently. And you cannot just add jar to your project - it will not work. Just add Google Play Services as eternal library as documented.

Post a Comment for "Can't Use Google Play Services On Unity Java Plugin"