2 pshiping2014 pshiping2014 于 2016.04.13 16:59 提问

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)

5个回答

u011249920
u011249920   2016.04.13 17:33

看第一句的错误是drawable下的abc_ic_menu_selectall_material.xml没找到。。

dongfeng9ge
dongfeng9ge   Ds   Rxr 2016.04.13 17:39

drawable下的abc_ic_menu_selectall_material.xml没找到?这是系统的问题吧?

cyxevil
cyxevil   2016.04.14 17:56

System.err: android.content.res.Resources$NotFoundException: File res/drawable/abc_ic_menu_selectall_material.xml from drawable resource ID #0x7f020021

cyxevil
cyxevil   2016.04.14 17:57

你的editext是不是写了事件?

caoguangguang
caoguangguang   2016.04.14 19:17

看过一个在爆栈的回答说是 编译版本的sdk是23.1.0,回退到23就好了

Csdn user default icon
上传中...
上传图片
插入图片
准确详细的回答,更有利于被提问者采纳,从而获得C币。复制、灌水、广告等回答会被删除,是时候展现真正的技术了!