Unknown packet when receiving value for resource number

Everything looks fine. But:

Unknown packet when receiving value for resource number 0x7f040001

an exception throws.

enter image description hereenter image description here

+7
source share
2 answers

My code is:

Resources res = getResources(); InputStream is = res.openRawResource(R.xml.questions); 

then I changed it to:

 is = getApplicationContext().getResources().openRawResource(R.xml.questions); 

Now it works correctly: o

By the way, I had another problem:

 WARN/System.err(577): org.apache.harmony.xml.ExpatParser$ParseException: At line 1, column 0: not well-formed (invalid token) 

This link resolved: Android parsing XML file using saxparser

+7
source

Try:

Project menu → Clear

If it does not start a closed project, closes the eclipse and repeats ...

and the hint does not concern gen code, it should only be changed by eclipse itself .

MOD

sometimes eclipse goes crazy with code. When this happens, I usually change the code in res. This happens to me with lines, an eclipse changes the line to another, and the error changes when I change the order of several lines.

+2
source

All Articles