[英]Resource Drawable 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}
在這里找不到此可繪制對象:
<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" />
這是我嘗試引用的可繪制對象中ic_clear.xml文件的屏幕截圖,但它引發了錯誤:
這是什么問題? 我的可繪制文件夾中顯然有ic_clear.xml ...感謝您的幫助!
您所有的資源都位於drawable-v24
(適用於android 24及以上版本)文件夾中,只需將所有資源重新定位到drawable
fordder即可,
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.