LogCat 消息:未找到 Google Play 服务资源.检查您的项目配置以确保包含资源 [英] LogCat message: The Google Play services resources were not found. Check your project configuration to ensure that the resources are included

查看:36
本文介绍了LogCat 消息:未找到 Google Play 服务资源.检查您的项目配置以确保包含资源的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个使用 Google Maps Android v2 API 的应用程序.我已将 google-play-services_lib 库项目添加到我的工作区,并按照以下页面上的说明从我的应用程序项目中添加了对它的引用:

I have an application that uses the Google Maps Android v2 API. I've added the google-play-services_lib library project to my workspace and added a reference to it from my application project, following the instructions on these pages:

似乎一切正常:该应用程序使用默认标记显示地图和叠加层.所以我很确定我已经正确设置了 Google Play 服务和 Google Maps API.

Everything seems to work fine: The app displays maps and overlays with the default markers. So I'm pretty sure I've got the Google Play services and Google Maps API stuff set up correctly.

但是,无论何时初始化地图视图(在第二代 Nexus 7 上),我都会在 ADT LogCat 窗口中看到此消息:

However, I see this message in the ADT LogCat window whenever the map view is initialized (on a 2nd-gen Nexus 7):

The Google Play services resources were not found. Check your project configuration to ensure that the resources are included.

消息级别为Error,标签为GooglePlayServicesUtil.

The message level is Error, and the tag is GooglePlayServicesUtil.

这似乎是良性的,因为我的应用运行良好.但是我可以做什么或检查来尝试解决可能出现的任何问题?

This seems benign, as my app does work fine. But what can I do or check to try to address whatever the problem might be?

更多信息:每次在 LogCat 中出现未找到 Google Play 服务资源"消息时,前面都是这些消息,它们是警告并标记为 ResourceType:

Further info: Each time the "Google Play services resources were not found" message appears in LogCat, it is preceded by these messages, which are Warnings and tagged ResourceType:

getEntry failing because entryIndex 906 is beyond type entryCount 3

Failure getting entry for 0x7f0b038a (t=10 e=906) in package 0 (error -2147483647)

FWIW,当我搜索项目(包括 gen/R.java 文件)时,我在任何地方都找不到常量 0x7f0b038a.

FWIW, I can't find the constant 0x7f0b038a anywhere when I search the projects, including the gen/R.java files.

我已经检查了生成的 .apk 的内容,它包括 google-play-services_lib/res 目录中的所有资源.

I've checked the contents of the generated .apk, and it includes all of the resources that are in the google-play-services_lib/res directory.

另一个更新:添加 ActionBarSherlock 并将清单中的 targetSdkVersion 从 8 更新到 17 后,我现在在 LogCat 输出中看到另一个错误:

Another update: After adding ActionBarSherlock and updating the targetSdkVersion in my manifest from 8 to 17, I now see another error in the LogCat output:

Could not find class 'maps.af.k', referenced from method 'maps.ag.an.a'

可以在此处找到有关该问题的更多详细信息:Google 地图在 Android 上运行良好,但我仍然收到错误消息找不到类 'maps.i.k',引用自方法 maps.z.ag.a"

More details about that problem can be found here: Google Maps works fine on Android but I still get an error "Could not find class 'maps.i.k', referenced from method maps.z.ag.a"

再一次,该应用程序似乎运行良好.也许忽略这些错误"是安全的?

And once again, the app seems to work just fine. Maybe it's safe to ignore these "errors"?

推荐答案

这是 Google Play 服务库中的一个错误,它被归档在 issue 755.

This is a bug in the Google Play services library, and it is filed here under issue 755.

很遗憾,目前还没有任何解决方案.

Unfortunately, there isn't any solution yet.

这篇关于LogCat 消息:未找到 Google Play 服务资源.检查您的项目配置以确保包含资源的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆