安卓Bug記錄

1.Unable to start activity ComponentInfo{com.example.administrator.practice/com.example.administrator.practice.Main4Activity}: android.content.res.Resources$NotFoundException: Drawable com.example.administrator.practice:dimen/compat_notification_large_icon_max_height with resource ID #0x7f060053
 Caused by: android.content.res.Resources$NotFoundException: Drawable com.example.administrator.practice:dimen/compat_notification_large_icon_max_height with resource ID #0x7f060053
     Caused by: android.content.res.Resources$NotFoundException: Resource "com.example.administrator.practice:dimen/compat_notification_large_icon_max_height" (7f060053) is not a Drawable (color or path): TypedValue{t=0x5/d=0x14001 a=3 r=0x7f060053}

解決方法:第一種情況可能是把R.layout寫成了R.id,第二種情況可能是沒有把資源打包,不同的分辨率要適配不同的資源文件(drawable-xhdpi,drawable-hdpi,drawable-mdpi,drawable-xxhdpi,drawable-xxxhdpi),第三種情況是在進行插件化時的資源衝突。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章