W/ResourceType(463):无法在Android Activity中获取包0中的条目(错误-75) [英] W/ResourceType(463): Failure getting entry in package 0 (error -75) in Android Activity
问题描述
在我的Android应用程序的一个Activity
(顺便说一下,它是SherlockActivity
)中,我有一个普通的ListView
.
In one Activity
(it's a SherlockActivity
, by the way) of my Android application, I have a normal ListView
.
为此,我通过getListView().setOnItemClickListener(...)
设置了AdapterView.OnItemClickListener
.
然后在该侦听器中,使用AlertDialog.Builder
类构建AlertDialog
,然后将其显示给用户:
And in that listener, an AlertDialog
is built using the AlertDialog.Builder
class and then it is shown to the user:
getListView().setOnItemClickListener(new AdapterView.OnItemClickListener() {
public void onItemClick(AdapterView<?> parent, final View v, int position, long id) {
AlertDialog.Builder builder = new AlertDialog.Builder(MyActivity.this);
...
builder.setMessage(Html.fromHtml(...));
builder.show();
}
}
现在精确地在调用builder.show()
时,LogCat中始终会出现以下警告 :
Now exactly when builder.show()
is called, the following warning does always appear in LogCat:
W/ResourceType(463): Failure getting entry for 0x010802c9 (t=7 e=713) in package 0 (error -75)
这是哪里来的?在我看来,这似乎是我无法控制的,因为它出现在builder.show()
中,因此该警告可能在AlertDialog
类的源代码中的某个位置生成.这是真的吗?
Where does this come from? To me, it seems this is out of my control, as it appears with builder.show()
, so that this warning is maybe generated somewhere in the sources for the AlertDialog
class. Is this true?
如果没有,我如何找到缺少的资源?如何调试此警告?
If not, how can I find which resource is missing? How to debug this warning?
在R.java
中没有对应的0x010802c9
条目(或运行时的值),所以我真的不知道如何调试它.
There's no corresponding entry for 0x010802c9
(or whichever value that is at run time) in R.java
, so I really don't know how to debug this.
推荐答案
您是否要从工作线程而不是GUI线程打开它? 您可以使用以下命令检查该线程是否为GUI线程:
Are you trying to open it from worker thread instead of GUI thread? You can check if the thread is GUI thread with:
Looper.myLooper() == Looper.getMainLooper()
In order to be sure that it is opened from GUI thread, use handler or runOnUiThread method.
这篇关于W/ResourceType(463):无法在Android Activity中获取包0中的条目(错误-75)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!