Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

GCM example project error message "Could not find google-play-services_lib.apk"

With the example code provided on http://code.google.com/p/gcm/source/browse/#git%2Fgcm-client, the application launch protocol contains a message about a missing APK.

[2013-06-22 10:28:24 - GCMClientNewAPI] ------------------------------
[2013-06-22 10:28:24 - GCMClientNewAPI] Android Launch!
[2013-06-22 10:28:24 - GCMClientNewAPI] adb is running normally.
[2013-06-22 10:28:24 - GCMClientNewAPI] Performing com.google.android.gcm.demo.app.DemoActivity activity launch
[2013-06-22 10:28:29 - GCMClientNewAPI] Uploading GCMClientNewAPI.apk onto device '015d3e63881c020d'
[2013-06-22 10:28:30 - GCMClientNewAPI] Installing GCMClientNewAPI.apk...
[2013-06-22 10:29:07 - GCMClientNewAPI] Success!
[2013-06-22 10:29:07 - google-play-services_lib] Could not find google-play-services_lib.apk!
[2013-06-22 10:29:07 - GCMClientNewAPI] Starting activity com.google.android.gcm.demo.app.DemoActivity on device 015d3e63881c020d
[2013-06-22 10:29:07 - GCMClientNewAPI] ActivityManager: Starting: Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] cmp=com.google.android.gcm.demo.app/.DemoActivity }

However the application is able to connect to Play services, and get a registration id. Also sending messages seems to work fine - at least no errors are logged.

The library project is referenced by the demo project in the Android settings (as also can be seen in the project.properties file).

I am testing on a Nexus 7 device with the current Android 4.2.2 version, and the current Google Play Services version 3.1.36 (669520-30).

What could cause this Could not find google-play-services_lib.apk message?

like image 257
mjn Avatar asked Jun 22 '13 08:06

mjn


1 Answers

The solution was in a comment to the answer for this question:

Using the new Google Play Services

Steps:

  1. remove the google_play_services-lib reference from the Java build path
  2. add the library reference in Properties | Android | Library references
like image 91
mjn Avatar answered Oct 21 '22 22:10

mjn