Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

W/ResourceType(463): Failure getting entry in package 0 (error -75) in Android Activity

In one Activity (it's a SherlockActivity, by the way) of my Android application, I have a normal ListView.

For that ListView, I set an AdapterView.OnItemClickListener via getListView().setOnItemClickListener(...).

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();
    }
}

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)

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?

Edit: 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.

like image 481
caw Avatar asked Jan 14 '14 03:01

caw


1 Answers

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.

like image 57
Mr. P Avatar answered Nov 07 '22 22:11

Mr. P