简体   繁体   中英

how to solve android.content.res.Resources$NotFoundException: File res/drawable/ic_paper_plane.xml from drawable resource ID #0x7f02008f?

I know this question is asking many time but i tried all of that but nothing meet my requirement i used android:drawableLeft attribute in XML file for showing vector image in my button and its running on above API 21 but if i am running on same code in below API 21 like 19 then app got crashed, i am already add vectorDrawables.useSupportLibrary = true , and AppCompatDelegate.setCompatVectorFromResourcesEnabled(true); but both not work for me can any one help me out of this,my xml code is:

<android.support.v7.widget.AppCompatButton
      android:id="@+id/shduleSms"
      android:layout_width="wrap_content"
      android:layout_height="wrap_content"
      android:drawableLeft="@drawable/ic_shedule_sms"
      android:drawablePadding="5dip"
      app:layout_constraintTop_toBottomOf="@+id/textConCount"
      android:padding="15dp"
      android:layout_marginEnd="30dp"
      android:layout_marginRight="30dp"
      app:layout_constraintRight_toRightOf="@+id/textConCount"
      android:layout_marginTop="15dp"
      android:text="@string/sendlater"
      android:textColor="@color/white"
      android:theme="@style/MyButtonTwo"
      />

Please share your drawable code. There are some properties that cannot be used below SDK version 21 in vector drawable files and might lead to runtime crashes.

This error mostly occurrs due to a corrupt or unknown file. Please share your drawable source code if using an xml(vector).

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

Related Question Caused by: android.content.res.Resources$NotFoundException: File res/drawable/ic_email_black.xml from drawable resource ID #0x7f02007e android.content.res.Resources$NotFoundException: File res/drawable/ic_customer_toolbar.xml from drawable resource ID #0x7f0200d7 Android.Content.Res.Resources+NotFoundException: 'File res/drawable/abc_ic_clear_material.xml from drawable resource ID #0x7f07001d' Exception android.content.res.Resources$NotFoundException: File res/color/selector_tab_blue_white.xml from drawable resource ID #0x7f0601d8 android.content.res.Resources$NotFoundException File res/drawable/$my_app_img__0.xml from color state list resource ID #0x7f07000a Exception android.content.res.Resources$NotFoundException: File res/drawable/my.xml from drawable resource ID android.content.res.Resources$NotFoundException: Drawable compat_splash_screen_no_icon_background with resource ID #0x7f0801b6 android.content.res.Resources$NotFoundException: File Share with %s from xml type layout resource ID #0x7f0a001d Unable to Start Activity… android.content.res.Resources$NotFoundException: Drawable com.app: drawable/abc_vector_test with resource ID #0x7f07005c android.content.res.Resources$NotFoundException: Resource is not a Drawable (color or path): TypedValue{t=0x2/d=0x7f010076 a=2}
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM