gpt4 book ai didi

android - 解析 googleplayservices 失败

转载 作者:行者123 更新时间:2023-11-29 00:29:07 26 4
gpt4 key购买 nike

我正在尝试使用 google play 服务创建一个位置感知的 android 应用程序,因为这似乎是执行此操作的新推荐方式。我已经使用我在 android 开发者网站上找到的教程来设置我的项目。它看起来正确并且构建良好,但是,当具有 google play 服务依赖项的 Activity 开始之前的 Activity 时,我在日志 cat 中看到以下内容。

06-18 01:31:04.126: I/dalvikvm(30480): Failed resolving Lcom/example/activities/NewActivity; interface 1045 'Lcom/google/android/gms/common/GooglePlayServicesClient$ConnectionCallbacks;'
06-18 01:31:04.126: W/dalvikvm(30480): Link of class 'Lcom/example/activities/NewActivity;' failed
06-18 01:31:04.126: W/dalvikvm(30480): Unable to resolve superclass of Lcom/example/activities/NewActivity_; (930)
06-18 01:31:04.126: W/dalvikvm(30480): Link of class 'Lcom/example/activities/NewActivity_;' failed
06-18 01:31:04.126: E/dalvikvm(30480): Could not find class 'com.example.activities.NewActivity_', referenced from method com.example.activities.HomeActivity.clickCurrentDonation
06-18 01:31:04.126: W/dalvikvm(30480): VFY: unable to resolve const-class 936 (Lcom/example/activities/NewActivity_;) in Lcom/example/activities/HomeActivity;

这里NewActivity是使用google play服务无法加载的activity,HomeActivity是调用NewActivity的activity。这些错误甚至在我尝试启动 NewActivity 之前就出现在加载 HomeActivity 时。

我已经确认,如果我不包含 google play 服务代码,它可以正常工作。

我正在做的唯一一件似乎与规范或教程不同的事情是我使用的是 android-annotations 项目,这就是为什么你会在上面看到对 NewActivity_ 的引用,这是它使用的生成类基于我在基类中编写的代码。

有没有其他人遇到过这个问题或知道如何解决?

感谢您的帮助!

最佳答案

只需从 SDK 管理器重新安装 Google Play 服务并尝试再次链接并清理构建项目。

如果仍然不起作用,请下载另一个 SDK 文件夹并安装 Google Play 服务,然后在您的工作区中导入 Google Play 服务项目并链接到您当前的项目。

我不知道..这很奇怪但它对我有用。

关于android - 解析 googleplayservices 失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17164632/

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