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

Resources$NotFoundException #2

Open
MummyDing opened this issue Dec 24, 2015 · 0 comments
Open

Resources$NotFoundException #2

MummyDing opened this issue Dec 24, 2015 · 0 comments

Comments

@MummyDing
Copy link

I run the project,and it occurs the following exception:

Process: com.example.customview, PID: 25757
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.customview/com.example.customview.MainActivity}: android.content.res.Resources$NotFoundException: Resource ID #0x7f020004

at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2610)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2684)
at android.app.ActivityThread.access$800(ActivityThread.java:177)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1542)
at android.os.Handler.dispatchMessage(Handler.java:111)
at android.os.Looper.loop(Looper.java:194)
at android.app.ActivityThread.main(ActivityThread.java:5743)
at java.lang.reflect.Method.invoke(Native Method)
at java.lang.reflect.Method.invoke(Method.java:372)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:988)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:783)
Caused by: android.content.res.Resources$NotFoundException: Resource ID #0x7f020004
at android.content.res.Resources.getValue(Resources.java:1484)
at android.content.res.Resources.getDrawable(Resources.java:912)
at android.content.Context.getDrawable(Context.java:413)
at com.android.internal.widget.ToolbarWidgetWrapper.setIcon(ToolbarWidgetWrapper.java:321)
at com.android.internal.widget.ActionBarOverlayLayout.setIcon(ActionBarOverlayLayout.java:738)
at com.android.internal.policy.impl.PhoneWindow.setDefaultIcon(PhoneWindow.java:1735)
at android.app.Activity.initWindowDecorActionBar(Activity.java:2184)
at android.app.Activity.setContentView(Activity.java:2219)
at com.example.customview.MainActivity.onCreate(MainActivity.java:45)
at android.app.Activity.performCreate(Activity.java:6119)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1115)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2557)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2684) 
at android.app.ActivityThread.access$800(ActivityThread.java:177) 
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1542) 
at android.os.Handler.dispatchMessage(Handler.java:111) 
at android.os.Looper.loop(Looper.java:194) 
at android.app.ActivityThread.main(ActivityThread.java:5743) 
at java.lang.reflect.Method.invoke(Native Method) 
at java.lang.reflect.Method.invoke(Method.java:372) 
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:988) 
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:783) 

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

1 participant