问题描述
- Android 长按EditText时程序崩溃(华为4.4的手机),是什么原因? 2C
- 04-13 16:53:36.652 8880-8880/com.xiangchao.starspace W/System.err: android.content.res.Resources$NotFoundException: File res/drawable/abc_ic_menu_selectall_material.xml from drawable resource ID #0x7f020021
04-13 16:53:36.652 8880-8880/com.xiangchao.starspace W/System.err: at android.content.res.Resources.loadDrawable(Resources.java:2160)
04-13 16:53:36.652 8880-8880/com.xiangchao.starspace W/System.err: at com.huawei.android.content.res.ResourcesEx.loadDrawable(ResourcesEx.java:636)
04-13 16:53:36.652 8880-8880/com.xiangchao.starspace W/System.err: at android.content.res.Resources.getDrawable(Resources.java:747)
04-13 16:53:36.652 8880-8880/com.xiangchao.starspace W/System.err: at com.android.internal.view.menu.MenuItemImpl.getIcon(MenuItemImpl.java:388)
04-13 16:53:36.652 8880-8880/com.xiangchao.starspace W/System.err: at com.android.internal.view.menu.ActionMenuItemView.initialize(ActionMenuItemView.java:105)
04-13 16:53:36.652 8880-8880/com.xiangchao.starspace W/System.err: at com.android.internal.view.menu.ActionMenuPresenter.bindItemView(ActionMenuPresenter.java:182)
04-13 16:53:36.652 8880-8880/com.xiangchao.starspace W/System.err: at com.android.internal.view.menu.BaseMenuPresenter.getItemView(BaseMenuPresenter.java:178)
04-13 16:53:36.652 8880-8880/com.xiangchao.starspace W/System.err: at com.android.internal.view.menu.ActionMenuPresenter.getItemView(ActionMenuPresenter.java:168)
04-13 16:53:36.652 8880-8880/com.xiangchao.starspace W/System.err: at com.android.internal.view.menu.ActionMenuPresenter.flagActionItems(ActionMenuPresenter.java:446)
04-13 16:53:36.652 8880-8880/com.xiangchao.starspace W/System.err: at com.android.internal.view.menu.MenuBuilder.flagActionItems(MenuBuilder.java:1062)
04-13 16:53:36.662 8880-8880/com.xiangchao.starspace W/System.err: at com.android.internal.view.menu.BaseMenuPresenter.updateMenuView(BaseMenuPresenter.java:87)
04-13 16:53:36.662 8880-8880/com.xiangchao.starspace W/System.err: at com.android.internal.view.menu.ActionMenuPresenter.updateMenuView(ActionMenuPresenter.java:221)
04-13 16:53:36.662 8880-8880/com.xiangchao.starspace W/System.err: at com.android.internal.view.menu.BaseMenuPresenter.getMenuView(BaseMenuPresenter.java:72)
04-13 16:53:36.662 8880-8880/com.xiangchao.starspace W/System.err: at com.android.internal.view.menu.ActionMenuPresenter.getMenuView(ActionMenuPresenter.java:159)
04-13 16:53:36.662 8880-8880/com.xiangchao.starspace W/System.err: at com.android.internal.widget.ActionBarContextView.initForMode(ActionBarContextView.java:247)
04-13 16:53:36.662 8880-8880/com.xiangchao.starspace W/System.err: at com.android.internal.policy.impl.PhoneWindow$DecorView.startActionMode(PhoneWindow.java:2447)
04-13 16:53:36.662 8880-8880/com.xiangchao.starspace W/System.err: at com.android.internal.policy.impl.PhoneWindow$DecorView.startActionModeForChild(PhoneWindow.java:2387)
04-13 16:53:36.662 8880-8880/com.xiangchao.starspace W/System.err: at android.view.ViewGroup.startActionModeForChild(ViewGroup.java:665)
04-13 16:53:36.662 8880-8880/com.xiangchao.starspace W/System.err: at android.view.ViewGroup.startActionModeForChild(ViewGroup.java:665)
04-13 16:53:36.662 8880-8880/com.xiangchao.starspace W/System.err: at android.view.ViewGroup.startActionModeForChild(ViewGroup.java:665)
04-13 16:53:36.662 8880-8880/com.xiangchao.starspace W/System.err: at android.view.ViewGroup.startActionModeForChild(ViewGroup.java:665)
04-13 16:53:36.672 8880-8880/com.xiangchao.starspace W/System.err: at android.view.View.startActionMode(View.java:4555)
04-13 16:53:36.672 8880-8880/com.xiangchao.starspace W/System.err: at android.widget.Editor.setSelectionActionMode(Editor.java:4186)
04-13 16:53:36.672 8880-8880/com.xiangchao.starspace W/System.err: at android.widget.Editor.startSelectionActionMode(Editor.java:1561)
解决方案
看第一句的错误是drawable下的abc_ic_menu_selectall_material.xml没找到。。
解决方案二:
drawable下的abc_ic_menu_selectall_material.xml没找到?这是系统的问题吧?
解决方案三:
System.err: android.content.res.Resources$NotFoundException: File res/drawable/abc_ic_menu_selectall_material.xml from drawable resource ID #0x7f020021
解决方案四:
你的editext是不是写了事件?
解决方案五:
看过一个在爆栈的回答说是 编译版本的sdk是23.1.0,回退到23就好了
时间: 2024-11-08 20:11:51