BUGandroid.content.res.Resources$NotFoundException: File res/drawable-xxhdpi/toolbar_line.png from

Posted wzjhoutai

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了BUGandroid.content.res.Resources$NotFoundException: File res/drawable-xxhdpi/toolbar_line.png from相关的知识,希望对你有一定的参考价值。

SafeGod在coolpad(4.0)上执行。登陆进去的设备列表界面遇到的问题。三星和索尼没有这个问题。


06-24 15:23:06.897: E/androidRuntime(12655): FATAL EXCEPTION: main

06-24 15:23:06.897: E/AndroidRuntime(12655): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.jason.safeGod/com.jason.safeGod.activities.MyDevice}: android.view.InflateException: Binary XML file line #113: Error inflating class <unknown>

06-24 15:23:06.897: E/AndroidRuntime(12655): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1957)

06-24 15:23:06.897: E/AndroidRuntime(12655): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:1983)

06-24 15:23:06.897: E/AndroidRuntime(12655): at android.app.ActivityThread.access$600(ActivityThread.java:123)

06-24 15:23:06.897: E/AndroidRuntime(12655): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1147)

06-24 15:23:06.897: E/AndroidRuntime(12655): at android.os.Handler.dispatchMessage(Handler.java:99)

06-24 15:23:06.897: E/AndroidRuntime(12655): at android.os.Looper.loop(Looper.java:137)

06-24 15:23:06.897: E/AndroidRuntime(12655): at android.app.ActivityThread.main(ActivityThread.java:4430)

06-24 15:23:06.897: E/AndroidRuntime(12655): at java.lang.reflect.Method.invokeNative(Native Method)

06-24 15:23:06.897: E/AndroidRuntime(12655): at java.lang.reflect.Method.invoke(Method.java:511)

06-24 15:23:06.897: E/AndroidRuntime(12655): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:815)

06-24 15:23:06.897: E/AndroidRuntime(12655): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:582)

06-24 15:23:06.897: E/AndroidRuntime(12655): at dalvik.system.NativeStart.main(Native Method)

06-24 15:23:06.897: E/AndroidRuntime(12655): Caused by: android.view.InflateException: Binary XML file line #113: Error inflating class <unknown>

06-24 15:23:06.897: E/AndroidRuntime(12655): at android.view.LayoutInflater.createView(LayoutInflater.java:612)

06-24 15:23:06.897: E/AndroidRuntime(12655): at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)

06-24 15:23:06.897: E/AndroidRuntime(12655): at android.view.LayoutInflater.onCreateView(LayoutInflater.java:659)

06-24 15:23:06.897: E/AndroidRuntime(12655): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:684)

06-24 15:23:06.897: E/AndroidRuntime(12655): at android.view.LayoutInflater.rInflate(LayoutInflater.java:745)

06-24 15:23:06.897: E/AndroidRuntime(12655): at android.view.LayoutInflater.rInflate(LayoutInflater.java:748)

06-24 15:23:06.897: E/AndroidRuntime(12655): at android.view.LayoutInflater.inflate(LayoutInflater.java:495)

06-24 15:23:06.897: E/AndroidRuntime(12655): at android.view.LayoutInflater.inflate(LayoutInflater.java:396)

06-24 15:23:06.897: E/AndroidRuntime(12655): at android.view.LayoutInflater.inflate(LayoutInflater.java:352)

06-24 15:23:06.897: E/AndroidRuntime(12655): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:251)

06-24 15:23:06.897: E/AndroidRuntime(12655): at android.app.Activity.setContentView(Activity.java:1835)

06-24 15:23:06.897: E/AndroidRuntime(12655): at com.jason.safeGod.activities.MyDevice.onCreate(MyDevice.java:156)

06-24 15:23:06.897: E/AndroidRuntime(12655): at android.app.Activity.performCreate(Activity.java:4465)

06-24 15:23:06.897: E/AndroidRuntime(12655): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1052)

06-24 15:23:06.897: E/AndroidRuntime(12655): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:1920)

06-24 15:23:06.897: E/AndroidRuntime(12655): ... 11 more

06-24 15:23:06.897: E/AndroidRuntime(12655): Caused by: java.lang.reflect.InvocationTargetException

06-24 15:23:06.897: E/AndroidRuntime(12655): at java.lang.reflect.Constructor.constructNative(Native Method)

06-24 15:23:06.897: E/AndroidRuntime(12655): at java.lang.reflect.Constructor.newInstance(Constructor.java:417)

06-24 15:23:06.897: E/AndroidRuntime(12655): at android.view.LayoutInflater.createView(LayoutInflater.java:592)

06-24 15:23:06.897: E/AndroidRuntime(12655): ... 25 more

06-24 15:23:06.897: E/AndroidRuntime(12655): Caused by: android.content.res.Resources$NotFoundException: File res/drawable-xxhdpi/toolbar_line.png from drawable resource ID #0x7f02013c

06-24 15:23:06.897: E/AndroidRuntime(12655): at android.content.res.Resources.loadDrawable(Resources.java:2044)

06-24 15:23:06.897: E/AndroidRuntime(12655): at android.content.res.TypedArray.getDrawable(TypedArray.java:601)

06-24 15:23:06.897: E/AndroidRuntime(12655): at android.view.View.<init>(View.java:2790)

06-24 15:23:06.897: E/AndroidRuntime(12655): at android.widget.ImageView.<init>(ImageView.java:113)

06-24 15:23:06.897: E/AndroidRuntime(12655): at android.widget.ImageView.<init>(ImageView.java:109)

06-24 15:23:06.897: E/AndroidRuntime(12655): ... 28 more

06-24 15:23:06.897: E/AndroidRuntime(12655): Caused by: java.lang.IllegalArgumentException: width and height must be > 0

06-24 15:23:06.897: E/AndroidRuntime(12655): at android.graphics.Bitmap.createBitmap(Bitmap.java:603)

06-24 15:23:06.897: E/AndroidRuntime(12655): at android.graphics.Bitmap.createBitmap(Bitmap.java:551)

06-24 15:23:06.897: E/AndroidRuntime(12655): at android.graphics.Bitmap.createScaledBitmap(Bitmap.java:437)

06-24 15:23:06.897: E/AndroidRuntime(12655): at android.graphics.BitmapFactory.finishDecode(BitmapFactory.java:525)

06-24 15:23:06.897: E/AndroidRuntime(12655): at android.graphics.BitmapFactory.decodeStream(BitmapFactory.java:500)

06-24 15:23:06.897: E/AndroidRuntime(12655): at android.graphics.BitmapFactory.decodeResourceStream(BitmapFactory.java:352)

06-24 15:23:06.897: E/AndroidRuntime(12655): at android.graphics.drawable.Drawable.createFromResourceStream(Drawable.java:773)

06-24 15:23:06.897: E/AndroidRuntime(12655): at android.content.res.Resources.loadDrawable(Resources.java:2040)

06-24 15:23:06.897: E/AndroidRuntime(12655): ... 32 more


以上是关于BUGandroid.content.res.Resources$NotFoundException: File res/drawable-xxhdpi/toolbar_line.png from的主要内容,如果未能解决你的问题,请参考以下文章