multidex icon indicating copy to clipboard operation
multidex copied to clipboard

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

Open faisalmemon1991 opened this issue 11 years ago • 9 comments

This error appeared on Crouton library - https://github.com/keyboardsurfer/Crouton after implementing Multidex

android.content.res.Resources$NotFoundException: Resource ID #0x10102eb at android.content.res.Resources.getValue(Resources.java:1981) at android.content.res.Resources.getDimensionPixelSize(Resources.java:1476) at de.keyboardsurfer.android.widget.crouton.Crouton.initializeCroutonViewGroup(Crouton.java:817) at de.keyboardsurfer.android.widget.crouton.Crouton.initializeCroutonView(Crouton.java:801) at de.keyboardsurfer.android.widget.crouton.Crouton.getView(Crouton.java:779) at de.keyboardsurfer.android.widget.crouton.Manager.addCroutonToView(Manager.java:195) at de.keyboardsurfer.android.widget.crouton.Manager.handleMessage(Manager.java:164) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loop(Looper.java:176) at android.app.ActivityThread.main(ActivityThread.java:5419) at java.lang.reflect.Method.invokeNative(Native Method) at java.lang.reflect.Method.invoke(Method.java:525) at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1046) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:862) at dalvik.system.NativeStart.main(Native Method)

faisalmemon1991 avatar Oct 29 '14 13:10 faisalmemon1991

This one is weird. What multidex does is just spliting your dex file in multiple dex files, but it should not mess with your resources. Can you confirm that once the APK is generated the resource is there?

casidiablo avatar Oct 29 '14 18:10 casidiablo

I could not find any resource with such id in R.java

faisalmemon1991 avatar Oct 31 '14 06:10 faisalmemon1991

Don't trust R.java since it's automatically generated. Make sure that the resource (follow the stacktrace) which is being loaded exists in the resources of the APK.

casidiablo avatar Oct 31 '14 07:10 casidiablo

I dont know which resource not getting loaded, because its just giving resource id - see the stack trace above.

at android.content.res.Resources.getValue(Resources.java:1981)

Resources.java:1981 redirects me to a commented place. I dont know what is wrong :(

faisalmemon1991 avatar Nov 03 '14 12:11 faisalmemon1991

It's perfectly normal that Resources.java shows you incoherent stuff (sad but true). You should be looking at Crouton.java:817 instead.

casidiablo avatar Nov 03 '14 19:11 casidiablo

Crouton.java has only 140 lines of code :(

faisalmemon1991 avatar Nov 06 '14 05:11 faisalmemon1991

ROFLMAO!

Ok... so if you want to contribute with the community and/or help me help you, I'd create an example problem were I can reproduce and debug this.

casidiablo avatar Nov 06 '14 07:11 casidiablo

Sure :+1:

faisalmemon1991 avatar Nov 06 '14 10:11 faisalmemon1991

Actually, I just updated the README encouraging all people to witch to buildToolsVersion 21.1.0, since multidexing is officially supported now. So, you might try using that and keep the conversation in the android-dev mailing list and/or StackOverflow.

casidiablo avatar Nov 06 '14 16:11 casidiablo