You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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)
The text was updated successfully, but these errors were encountered:
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)
The text was updated successfully, but these errors were encountered: