我正在创建一个项目并在运行时遇到麻烦我试图清理重新启动它的项目

时间:2018-03-19 09:46:46

标签: android

03-19 14:57:58.523 22517-22517/com.example.vrindabhatt.wall_app E/AndroidRuntime: FATAL EXCEPTION: main
    Process: com.example.vrindabhatt.wall_app, PID: 22517
    android.content.res.Resources$NotFoundException: Resource ID #0x7f07007a
        at android.content.res.Resources.getValue(Resources.java:2345)
        at android.support.v7.widget.AppCompatDrawableManager.loadDrawableFromDelegates(AppCompatDrawableManager.java:330)
        at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:195)
        at android.support.v7.widget.AppCompatDrawableManager.getDrawable(AppCompatDrawableManager.java:188)
        at android.support.v7.content.res.AppCompatResources.getDrawable(AppCompatResources.java:100)
        at android.support.v7.view.menu.MenuItemImpl.getIcon(MenuItemImpl.java:491)
        at android.support.v7.view.menu.ActionMenuItemView.initialize(ActionMenuItemView.java:125)
        at android.support.v7.widget.ActionMenuPresenter.bindItemView(ActionMenuPresenter.java:210)
        at android.support.v7.view.menu.BaseMenuPresenter.getItemView(BaseMenuPresenter.java:187)
        at android.support.v7.widget.ActionMenuPresenter.getItemView(ActionMenuPresenter.java:196)
        at android.support.v7.widget.ActionMenuPresenter.flagActionItems(ActionMenuPresenter.java:476)
        at android.support.v7.view.menu.MenuBuilder.flagActionItems(MenuBuilder.java:1164)
        at android.support.v7.view.menu.BaseMenuPresenter.updateMenuView(BaseMenuPresenter.java:95)
        at android.support.v7.widget.ActionMenuPresenter.updateMenuView(ActionMenuPresenter.java:229)
        at android.support.v7.view.menu.MenuBuilder.dispatchPresenterUpdate(MenuBuilder.java:291)
        at android.support.v7.view.menu.MenuBuilder.onItemsChanged(MenuBuilder.java:1051)
        at android.support.v7.view.menu.MenuBuilder.startDispatchingItemsChanged(MenuBuilder.java:1078)
        at android.support.v7.app.ToolbarActionBar.populateOptionsMenu(ToolbarActionBar.java:461)
        at android.support.v7.app.ToolbarActionBar$1.run(ToolbarActionBar.java:57)
        at android.os.Handler.handleCallback(Handler.java:739)
        at android.os.Handler.dispatchMessage(Handler.java:95)
        at android.os.Looper.loop(Looper.java:145)
        at android.app.ActivityThread.main(ActivityThread.java:5942)
        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:1400)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1195)

1 个答案:

答案 0 :(得分:0)

通过查看您的错误消息,您似乎正在尝试获取可绘制资源,Android无法找到该资源。可能的解决方案,

  1. 确保使用findViewById链接资源
  2. 检查您的代码中调用的所有资源是否都存在于drawable目录中。
  3. 您可以更新您的问题并向我们提供更多关于您要实现的内容的故事,并且可能会分享您认为可能遇到问题的代码段。