Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
faisalmemon1991 opened this issue Oct 29, 2014 · 9 comments

Comments

@faisalmemon1991
Copy link

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)

@casidiablo
Copy link
Owner

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?

@faisalmemon1991
Copy link
Author

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

@casidiablo
Copy link
Owner

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.

@faisalmemon1991
Copy link
Author

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 :(

@casidiablo
Copy link
Owner

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

@faisalmemon1991
Copy link
Author

Crouton.java has only 140 lines of code :(

@casidiablo
Copy link
Owner

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.

@faisalmemon1991
Copy link
Author

Sure 👍

@casidiablo
Copy link
Owner

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants