安卓资源未发现异常? [英] Android resource not found exception?
问题描述
我有一个奇怪的问题,用findViewById(ID)。它回来与资源未找到,即使资源肯定是存在的。这是在布局一个TextView旁边另一个TextView的,该textviews我可以通过ID找到,但在其他节目中的一个资源未找到。是否有任何理由,这可能是这样吗?
I am having a strange problem using findViewById(id). It comes back with resource not found even though the resource is definitely there. It is a textview in a layout next to another textview, one of the textviews I can find by id but the other shows resource not found. Is there any reason this might be happening?
推荐答案
尝试清洁您的项目或张贴一些code。
Try cleaning your project or post some code.
有时候ID的没有得到正确的,如果你使用的是Eclipse再生。这就要求项目待清洁和有时刷新。
Sometimes the ID's do not get correctly regenerated if you are using Eclipse. This requires the project to be cleaned and sometimes refreshed.
这篇关于安卓资源未发现异常?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!