我最近收到了我的应用程序的崩溃报告。它是这样说的:
android.content.res.Resources$NotFoundException: File res/drawable-xhdpi/bg.png from drawable resource ID #0x7f020005
然后这个:
Caused by: java.lang.IllegalArgumentException: width and height must be > 0
at android.graphics.Bitmap.nativeCreate(Native Method)
at android.graphics.Bitmap.createBitmap(Bitmap.java:477)
at android.graphics.Bitmap.createBitmap(Bitmap.java:444)
at android.graphics.Bitmap.createScaledBitmap(Bitmap.java:349)
at android.graphics.BitmapFactory.finishDecode(BitmapFactory.java:601)
at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:576)
at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:439)
at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:697)
at android.content.res.Resources.loadDrawable(Resources.java:1709)
我在几台设备上测试了我的应用程序,但都没有崩溃。根据我应用程序的用户的说法,这个错误似乎出现在三星 Galaxy y pro 上,我真的不知道该怎么办......