14

I am trying to use the new Google Play Services for Google Plus integration from this link: http://ankitthakkar90.blogspot.sg/2013/05/google-plus-integration-in-android.html

I was able to get everything right except when i try to run it, it provide me with this error

Android Launch!
adb is running normally.
Performing com.anky.googleplus.MainActivity activity launch
Automatic Target Mode: using device 'CB5A1MQW4P'
Uploading GooglePlusDemo.apk onto device 'CB5A1MQW4P'
Installing GooglePlusDemo.apk...
Success!
Could not find google-play-services_lib.apk!
Starting activity com.anky.googleplus.MainActivity on device CB5A1MQW4P
ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.anky.googleplus/.MainActivity }

I did reference the library via eclipse Properties > Android > Add Library like what is done here: Using the new Google Play Services This error still occured. Any suggest and feed back is welcome.

Community
  • 1
  • 1
Tay Victor
  • 141
  • 1
  • 1
  • 3

8 Answers8

50

When Adding refenced libraries we need only google-play-services_lib.jar.So that we need to remove the project from your project.

Project->Properties->javaBuildPath->Project->select google-play-services->remove.

clean and build.

anshad
  • 824
  • 8
  • 19
  • 3
    Why in the world would the other way not work if Google's own instructions say to do it that way? Ugh. Anyways, thanks a lot. This fixed for me. – boltup_im_coding Oct 31 '13 at 05:02
  • Ugh, I'd had it referencing just the jar. Then I was having another problem, so I figured I'd double-check my Play Services references. I came across [the instructions from Google](http://developer.android.com/google/play-services/setup.html) that `unexpected62` is probably talking about. That seemed to be the right way, so I ended up following Google's own directions and breaking everything. Thanks for re-clarifying! – s.co.tt Apr 25 '14 at 22:10
  • 2
    OMFG.. thanks so much for this... I was starting to lose hair with this problem.... – Mariano L Jul 23 '14 at 21:26
  • Holy Moly, it worked for me too! And as @Shradha says, I have no freaking idea why it did – Aman Alam Jan 23 '15 at 07:31
6

Well i had this same problem.. I then found out that i had incorrectly referenced it first in the java build path before referencing it from the Properties > Android > Add Library . Solution First remove both the reference from the java build and the Properties > Android > Add Library then reference google_Play_services_lib from Properties > Android > Add Library again. Hope this helps :)

Benil Mathew
  • 1,638
  • 11
  • 23
5

You don't install the google-play-services_lib APK, you should reference it on your project as an Android Library Project and the JAR will be included inside your APK.

http://developer.android.com/google/play-services/setup.html

This link teaches you how to reference an android library project:

http://developer.android.com/tools/projects/projects-eclipse.html#ReferencingLibraryProject

thiagolr
  • 6,909
  • 6
  • 44
  • 64
  • May I know what JAR file that you are referring to? Is it the android-support-v13.jar? I followed the other steps and the problem still persist – Tay Victor May 26 '13 at 13:30
  • The JAR file will be generated and referenced automatically if you properly set the google-play-services_lib library as an Android Library Project. Are you using Eclipse to build and run your code? – thiagolr May 26 '13 at 13:37
  • Apparently I did not create the oAuth for my application. I solved the problem by following this link: https://developers.google.com/+/mobile/android/getting-started#step_3_initialize_the_plusclient – Tay Victor May 26 '13 at 14:19
5

In your manifiest file put it inside

<meta-data
        android:name="com.google.android.gms.version"
        android:value="@integer/google_play_services_version" />
David
  • 95
  • 1
  • 8
0

In my case this error was fixed by checking Android Private Dependencies checkbox in google-play-services_lib eclipse project > Properties > Java Build Path > Order and Export tab. It was checked as well in the main project which has the reference to google-play-services_lib. I still get the Could not find google-play-services_lib.apk! error in console but the maps activities run OK, while before the change I got run time errors and the application crashed.

Diana
  • 2,186
  • 1
  • 20
  • 31
0

My advice is to copy google-play-services.jar to libs folder of the project. It worked for me.

Kresimir Plese
  • 3,497
  • 1
  • 20
  • 15
-1

I think the device on which you are trying to run the Google Play Services does not contain the Google Play services APK.

Check this link on Android Developers for more clearance

Ensuring Devices Have the Google Play services APK

bakriOnFire
  • 2,685
  • 1
  • 15
  • 27
-1

Check whether that the library project is added into project, if not then check whether the library project and your project is in same directory.

chandu tangudu
  • 137
  • 1
  • 6