Select All causes abc_ic_menu_selectall_material.xml Resources NotFoundException

Refresh

December 2018

Views

434 time

4

When I run my app on a pre-Lollipop device and try to press and hold any text to select text the app will crash.

Here is the error I get:

03-27 10:53:45.794 10156-10156/com.****** E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.******, PID: 10156
android.content.res.Resources$NotFoundException: File res/drawable/abc_ic_menu_selectall_material.xml from drawable resource ID #0x7f02001e
    at android.content.res.Resources.loadDrawable(Resources.java:3448)
    at android.content.res.Resources.getDrawable(Resources.java:1892)
    at com.android.internal.view.menu.MenuItemImpl.getIcon(MenuItemImpl.java:388)
    at com.android.internal.view.menu.ActionMenuItemView.initialize(ActionMenuItemView.java:151)
    at com.android.internal.view.menu.ActionMenuPresenter.bindItemView(ActionMenuPresenter.java:263)
    at com.android.internal.view.menu.BaseMenuPresenter.getItemView(BaseMenuPresenter.java:178)
    at com.android.internal.view.menu.ActionMenuPresenter.getItemView(ActionMenuPresenter.java:249)
    at com.android.internal.view.menu.ActionMenuPresenter.flagActionItems(ActionMenuPresenter.java:530)
    at com.android.internal.view.menu.MenuBuilder.flagActionItems(MenuBuilder.java:1062)
    at com.android.internal.view.menu.BaseMenuPresenter.updateMenuView(BaseMenuPresenter.java:87)
    at com.android.internal.view.menu.ActionMenuPresenter.updateMenuView(ActionMenuPresenter.java:302)
    at com.android.internal.view.menu.BaseMenuPresenter.getMenuView(BaseMenuPresenter.java:72)
    at com.android.internal.view.menu.ActionMenuPresenter.getMenuView(ActionMenuPresenter.java:240)
    at com.android.internal.widget.ActionBarContextView.initForMode(ActionBarContextView.java:399)
    at com.android.internal.policy.impl.PhoneWindow$DecorView.startActionMode(PhoneWindow.java:2552)
    at com.android.internal.policy.impl.PhoneWindow$DecorView.startActionModeForChild(PhoneWindow.java:2492)
    at android.view.ViewGroup.startActionModeForChild(ViewGroup.java:665)
    at android.view.ViewGroup.startActionModeForChild(ViewGroup.java:665)
    at android.view.ViewGroup.startActionModeForChild(ViewGroup.java:665)
    at android.view.ViewGroup.startActionModeForChild(ViewGroup.java:665)
    at android.view.View.startActionMode(View.java:4594)
    at android.widget.Editor.startSelectionActionMode(Editor.java:1656)
    at android.widget.Editor.performLongClick(Editor.java:907)
    at android.widget.TextView.performLongClick(TextView.java:8859)
    at android.view.View$CheckForLongPress.run(View.java:18582)
    at android.os.Handler.handleCallback(Handler.java:733)
    at android.os.Handler.dispatchMessage(Handler.java:95)
    at android.os.Looper.loop(Looper.java:136)
    at android.app.ActivityThread.main(ActivityThread.java:5426)
    at java.lang.reflect.Method.invokeNative(Native Method)
    at java.lang.reflect.Method.invoke(Method.java:515)
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1268)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1084)
    at dalvik.system.NativeStart.main(Native Method)
 Caused by: org.xmlpull.v1.XmlPullParserException: Binary XML file line
    #17: invalid drawable tag vector
    at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:969)
    at android.graphics.drawable.Drawable.createFromXml(Drawable.java:913)
    at android.content.res.Resources.loadDrawable(Resources.java:3444)
    at android.content.res.Resources.getDrawable(Resources.java:1892) 
    at com.android.internal.view.menu.MenuItemImpl.getIcon(MenuItemImpl.java:388) 
    at com.android.internal.view.menu.ActionMenuItemView.initialize(ActionMenuItemView.java:151) 
    at com.android.internal.view.menu.ActionMenuPresenter.bindItemView(ActionMenuPresenter.java:263) 
    at com.android.internal.view.menu.BaseMenuPresenter.getItemView(BaseMenuPresenter.java:178) 
    at com.android.internal.view.menu.ActionMenuPresenter.getItemView(ActionMenuPresenter.java:249) 
    at com.android.internal.view.menu.ActionMenuPresenter.flagActionItems(ActionMenuPresenter.java:530) 
    at com.android.internal.view.menu.MenuBuilder.flagActionItems(MenuBuilder.java:1062) 
    at com.android.internal.view.menu.BaseMenuPresenter.updateMenuView(BaseMenuPresenter.java:87) 
    at com.android.internal.view.menu.ActionMenuPresenter.updateMenuView(ActionMenuPresenter.java:302) 
    at com.android.internal.view.menu.BaseMenuPresenter.getMenuView(BaseMenuPresenter.java:72) 
    at com.android.internal.view.menu.ActionMenuPresenter.getMenuView(ActionMenuPresenter.java:240) 
    at com.android.internal.widget.ActionBarContextView.initForMode(ActionBarContextView.java:399) 
    at com.android.internal.policy.impl.PhoneWindow$DecorView.startActionMode(PhoneWindow.java:2552) 
    at com.android.internal.policy.impl.PhoneWindow$DecorView.startActionModeForChild(PhoneWindow.java:2492) 
    at android.view.ViewGroup.startActionModeForChild(ViewGroup.java:665) 
    at android.view.ViewGroup.startActionModeForChild(ViewGroup.java:665) 
    at android.view.ViewGroup.startActionModeForChild(ViewGroup.java:665) 
    at android.view.ViewGroup.startActionModeForChild(ViewGroup.java:665) 
    at android.view.View.startActionMode(View.java:4594) 
    at android.widget.Editor.startSelectionActionMode(Editor.java:1656) 
    at android.widget.Editor.performLongClick(Editor.java:907) 
    at android.widget.TextView.performLongClick(TextView.java:8859) 
    at android.view.View$CheckForLongPress.run(View.java:18582) 
    at android.os.Handler.handleCallback(Handler.java:733) 
    at android.os.Handler.dispatchMessage(Handler.java:95) 
    at android.os.Looper.loop(Looper.java:136) 
    at android.app.ActivityThread.main(ActivityThread.java:5426) 
    at java.lang.reflect.Method.invokeNative(Native Method) 
    at java.lang.reflect.Method.invoke(Method.java:515) 
    at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1268) 
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1084) 
    at dalvik.system.NativeStart.main(Native Method)

2 answers

0

Я получил вокруг этого обновления appcompat-v7:23.2.0до appcompat-v7:23.2.1.

Ошибка из - за известной Android ошибки в AppCompat. Смотрите этот андроид сообщение об ошибке для более подробной информации.

1

Я нашел решение, я использовал compileSdkVersion «андроид-N», по- видимому , это была ошибка , которая была исправлена в SDK 23.1.0 , но по какой - то причине разработчики не смогли зафиксировать его в андроиде п просмотра SDK. вернулся к SDK 23 все начали снова работать на своих старых устройствах.