资源NotFoundException? [英] Resources NotFoundException?

查看:121
本文介绍了资源NotFoundException?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我收到崩溃报告:

android.content.res.Resources$NotFoundException: Resource ID #0x....

我一个星期获得有关这些17。它指向我下面在我的code:

I get about 17 of these a week. It's pointing me to the following in my code:

context.getResources().getDrawable(R.drawable.foo);

这是资源肯定是美元的我/绘制文件夹第$ psent。我有几十万的安装,我不知道这到底是怎么失败的一些用户,但工作对于绝大多数。我想看看发生了什么事情,因为他们不能用在这种状态下的应用程序。任何想法?

That resource is definitely present in my /drawable folder. I have several hundred thousand installs, I'm not sure how this could be failing for some users, but working for the vast majority. I'd like to find out what's going on, because they can't use the app in this state. Any ideas?

感谢

---------更新----------------------

--------- Update ----------------------

此外,我可以看到被拉伸的问题在我的R.java文件中的条目,如下:

Also I can see the entry for the drawable in question in my R.java file, looks like:

public static final int foo=0x7f020034;

我做一个干净的建设项目,再伸直后做我的发布版本(在两者之间给予自动Eclipse构建的东西可能让R档出差错没有code修改)

I do a clean build of the project, then straight after that do my release build (no code modification in between to give the automatic eclipse build stuff possibly let the R file go awry)

感谢

推荐答案

在崩溃报告从版本&LT即将= 1.6,你有一定的资源,只有合格的文件夹,即绘制,MDPI ,而不是仅仅绘制?如果是这样的话,在此页面。

Is the crash reports coming from version <=1.6, and you have certain resources only in qualified folders, i.e. "drawable-mdpi" instead of just "drawable"? If so then read about "Known issues" at the bottom of this page.

这篇关于资源NotFoundException?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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