安卓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),第三种情况是在进行插件化时的资源冲突。

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