gpt4 book ai didi

android - GCM 示例项目错​​误消息 "Could not find google-play-services_lib.apk"

转载 作者:塔克拉玛干 更新时间:2023-11-01 21:20:45 25 4
gpt4 key购买 nike

使用 http://code.google.com/p/gcm/source/browse/#git%2Fgcm-client 上提供的示例代码,应用程序启动协议(protocol)包含有关缺少 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 }

但是应用程序能够连接到 Play 服务,并获得一个注册 ID。发送消息似乎也能正常工作——至少没有记录错误。

Android 设置中的演示项目引用了库项目(也可以在 project.properties 文件中看到)。

我正在使用当前 Android 4.2.2 版本和当前 Google Play 服务版本 3.1.36 (669520-30) 的 Nexus 7 设备上进行测试。

什么可能导致此 Could not find google-play-services_lib.apk 消息?

最佳答案

解决方案在对这个问题的答案的评论中:

Using the new Google Play Services

步骤:

  1. 从 Java 构建路径中删除 google_play_services-lib 引用
  2. 在属性中添加库引用 |安卓|图书馆引用

关于android - GCM 示例项目错​​误消息 "Could not find google-play-services_lib.apk",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17248832/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com