简体   繁体   English

找不到资源可绘制

[英]Resource Drawable Not Found

When I install my application on my phone, it immediately crashes telling me the drawable is not found: 当我在手机上安装应用程序时,它立即崩溃,告诉我找不到可绘制对象:

Resource "com.aaronapp.hideme:drawable/ic_clear" (7f07007a)  is not a Drawable (color or path): TypedValue{t=0x1/d=0x7f07007a a=-1 r=0x7f07007a}

Here is where it is not finding this drawable: 在这里找不到此可绘制对象:

<android.support.design.widget.FloatingActionButton
    android:id="@+id/clear_button"
    android:layout_width="wrap_content"
    android:layout_height="wrap_content"
    android:layout_alignParentEnd="true"
    android:layout_alignParentRight="true"
    android:layout_alignParentTop="true"
    android:src="@drawable/ic_clear"
    android:visibility="gone"
    app:backgroundTint="@android:color/white"
    app:fabSize="mini" />

And here is a screenshot of the ic_clear.xml file that is in the drawable that I am trying to refer to, but it's throwing the error: 这是我尝试引用的可绘制对象中ic_clear.xml文件的屏幕截图,但它引发了错误:

在此处输入图片说明

What is the issue here? 这是什么问题? I clearly have ic_clear.xml in my drawable folder... thanks for the help! 我的可绘制文件夹中显然有ic_clear.xml ...感谢您的帮助!

您所有的资源都位于drawable-v24 (适用于android 24及以上版本)文件夹中,只需将所有资源重新定位到drawable fordder即可,

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 使用 Android 4.4.4 找不到可绘制资源 - Drawable Resource not found using Android 4.4.4 资源不是可绘制的 - Resource is not a Drawable 我无法解决错误:找不到资源可绘制/ abc(又名com.example.myapplication:drawable / abc) - I cant solve error:resource drawable/abc (aka com.example.myapplication:drawable/abc) not found 如何修复 AAPT:错误:找不到资源 drawable/tt(又名 com.example.polyresults:drawable/tt) - How to fix AAPT: error: resource drawable/tt (aka com.example.polyresults:drawable/tt) not found 缩放Android可绘制资源 - Scaling Android drawable resource Unity项目中的错误:找不到与给定名称匹配的资源(在“ icon”处,值为“ @ drawable / ic_launcher”) - Error in Unity project : No resource found that matches the given name (at 'icon' with value '@drawable/ic_launcher') 错误:在eclispe中找不到与给定名称(在&#39;srcCompat&#39;,值为&#39;@ drawable-hdpi / ic_launcher&#39;)匹配的资源 - Error: No resource found that matches the given name (at 'srcCompat' with value '@drawable-hdpi/ic_launcher') in eclispe 即使资源存在于可绘制文件夹中,资源未找到异常(无法找到资源 ID) - Resources Not Found Exception (Unable to find resource ID) even though resources exist in drawable folder 错误:找不到与给定名称匹配的资源(在“ src”处,值为“ @ drawable / black_title”) - Error: No resource found that matches the given name (at 'src' with value '@drawable/black_title') 错误:找不到与给定名称匹配的资源(在“背景”中值为“ @ drawable-mdpi / 1.jpg”) - Error: No resource found that matches the given name (at 'background' with value '@drawable-mdpi/1.jpg')
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM