eclipse GCM 示例项目错误消息“找不到 google-play-services_lib.apk”
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/17248832/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
GCM example project error message "Could not find google-play-services_lib.apk"
提问by mjn
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.
使用http://code.google.com/p/gcm/source/browse/#git%2Fgcm-client 上提供的示例代码,应用程序启动协议包含一条关于缺少 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.
但是,该应用程序能够连接到 Play 服务,并获得注册 ID。同样发送消息似乎工作正常 - 至少没有记录错误。
The library project is referenced by the demo project in the Android settings (as also can be seen in the project.properties file).
库项目由 Android 设置中的演示项目引用(也可以在 project.properties 文件中看到)。
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).
我正在使用当前 Android 4.2.2 版本和当前 Google Play 服务版本 3.1.36 (669520-30) 的 Nexus 7 设备进行测试。
What could cause this Could not find google-play-services_lib.apk message?
什么可能导致此无法找到 google-play-services_lib.apk 消息?
回答by mjn
The solution was in a comment to the answer for this question:
解决方案是对这个问题的答案的评论:
Using the new Google Play Services
Steps:
脚步:
- remove the google_play_services-lib reference from the Java build path
- add the library reference in Properties | Android | Library references
- 从 Java 构建路径中删除 google_play_services-lib 引用
- 在属性中添加库引用 | 安卓 | 图书馆参考