Caused by: android.content.res.Resources$NotFoundException: File res/drawable/main_tab_conversation_


机型:coolpad 5951

 
  
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.yckj.ycsafehelper/com.yckj.ycsafehelper.activity.MainActivity}: android.view.InflateException: Binary XML file line #22: Error inflating class android.widget.Button
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2069)
	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2094)
	at android.app.ActivityThread.access$600(ActivityThread.java:135)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1205)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loop(Looper.java:137)
	at android.app.ActivityThread.main(ActivityThread.java:4855)
	at java.lang.reflect.Method.invokeNative(Native Method)
	at java.lang.reflect.Method.invoke(Method.java:511)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:809)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:576)
	at dalvik.system.NativeStart.main(Native Method)
Caused by: android.view.InflateException: Binary XML file line #22: Error inflating class android.widget.Button
	at android.view.LayoutInflater.createView(LayoutInflater.java:613)
	at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
	at android.view.LayoutInflater.onCreateView(LayoutInflater.java:660)
	at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:685)
	at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)
	at android.view.LayoutInflater.rInflate(LayoutInflater.java:749)
	at android.view.LayoutInflater.rInflate(LayoutInflater.java:749)
	at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
	at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
	at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
	at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:260)
	at android.app.Activity.setContentView(Activity.java:1903)
	at com.yckj.ycsafehelper.activity.MainActivity.onCreate(MainActivity.java:155)
	at android.app.Activity.performCreate(Activity.java:5051)
	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1101)
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2033)
	... 11 more
Caused by: java.lang.reflect.InvocationTargetException
	at java.lang.reflect.Constructor.constructNative(Native Method)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
	at android.view.LayoutInflater.createView(LayoutInflater.java:587)
	... 26 more
Caused by: android.content.res.Resources$NotFoundException: File res/drawable/main_tab_conversation_s.xml from drawable resource ID #0x7f0201de
	at android.content.res.Resources.loadDrawable(Resources.java:2064)
	at android.content.res.TypedArray.getDrawable(TypedArray.java:601)
	at android.widget.TextView.(TextView.java:767)
	at android.widget.Button.(Button.java:107)
	at android.widget.Button.(Button.java:103)
	... 29 more
Caused by: android.content.res.Resources$NotFoundException: File res/drawable-hdpi/tab_img1.png from drawable resource ID #0x7f02023d
	at android.content.res.Resources.loadDrawable(Resources.java:2104)
	at android.content.res.Resources.getDrawable(Resources.java:714)
	at android.graphics.drawable.StateListDrawable.inflate(StateListDrawable.java:173)
	at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:881)
	at android.graphics.drawable.Drawable.createFromXml(Drawable.java:818)
	at android.content.res.Resources.loadDrawable(Resources.java:2061)
	... 33 more
Caused by: java.io.FileNotFoundException: res/drawable-hdpi/tab_img1.png
	at android.content.res.AssetManager.openNonAssetNative(Native Method)
	at android.content.res.AssetManager.openNonAsset(AssetManager.java:420)
	at android.content.res.Resources.loadDrawable(Resources.java:2096)
	... 38 more
android.view.InflateException: Binary XML file line #22: Error inflating class android.widget.Button
	at android.view.LayoutInflater.createView(LayoutInflater.java:613)
	at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
	at android.view.LayoutInflater.onCreateView(LayoutInflater.java:660)
	at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:685)
	at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)
	at android.view.LayoutInflater.rInflate(LayoutInflater.java:749)
	at android.view.LayoutInflater.rInflate(LayoutInflater.java:749)
	at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
	at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
	at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
	at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:260)
	at android.app.Activity.setContentView(Activity.java:1903)
	at com.yckj.ycsafehelper.activity.MainActivity.onCreate(MainActivity.java:155)
	at android.app.Activity.performCreate(Activity.java:5051)
	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1101)
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2033)
	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2094)
	at android.app.ActivityThread.access$600(ActivityThread.java:135)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1205)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loop(Looper.java:137)
	at android.app.ActivityThread.main(ActivityThread.java:4855)
	at java.lang.reflect.Method.invokeNative(Native Method)
	at java.lang.reflect.Method.invoke(Method.java:511)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:809)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:576)
	at dalvik.system.NativeStart.main(Native Method)
Caused by: java.lang.reflect.InvocationTargetException
	at java.lang.reflect.Constructor.constructNative(Native Method)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
	at android.view.LayoutInflater.createView(LayoutInflater.java:587)
	... 26 more
Caused by: android.content.res.Resources$NotFoundException: File res/drawable/main_tab_conversation_s.xml from drawable resource ID #0x7f0201de
	at android.content.res.Resources.loadDrawable(Resources.java:2064)
	at android.content.res.TypedArray.getDrawable(TypedArray.java:601)
	at android.widget.TextView.(TextView.java:767)
	at android.widget.Button.(Button.java:107)
	at android.widget.Button.(Button.java:103)
	... 29 more
Caused by: android.content.res.Resources$NotFoundException: File res/drawable-hdpi/tab_img1.png from drawable resource ID #0x7f02023d
	at android.content.res.Resources.loadDrawable(Resources.java:2104)
	at android.content.res.Resources.getDrawable(Resources.java:714)
	at android.graphics.drawable.StateListDrawable.inflate(StateListDrawable.java:173)
	at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:881)
	at android.graphics.drawable.Drawable.createFromXml(Drawable.java:818)
	at android.content.res.Resources.loadDrawable(Resources.java:2061)
	... 33 more
Caused by: java.io.FileNotFoundException: res/drawable-hdpi/tab_img1.png
	at android.content.res.AssetManager.openNonAssetNative(Native Method)
	at android.content.res.AssetManager.openNonAsset(AssetManager.java:420)
	at android.content.res.Resources.loadDrawable(Resources.java:2096)
	... 38 more
java.lang.reflect.InvocationTargetException
	at java.lang.reflect.Constructor.constructNative(Native Method)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
	at android.view.LayoutInflater.createView(LayoutInflater.java:587)
	at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
	at android.view.LayoutInflater.onCreateView(LayoutInflater.java:660)
	at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:685)
	at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)
	at android.view.LayoutInflater.rInflate(LayoutInflater.java:749)
	at android.view.LayoutInflater.rInflate(LayoutInflater.java:749)
	at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
	at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
	at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
	at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:260)
	at android.app.Activity.setContentView(Activity.java:1903)
	at com.yckj.ycsafehelper.activity.MainActivity.onCreate(MainActivity.java:155)
	at android.app.Activity.performCreate(Activity.java:5051)
	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1101)
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2033)
	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2094)
	at android.app.ActivityThread.access$600(ActivityThread.java:135)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1205)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loop(Looper.java:137)
	at android.app.ActivityThread.main(ActivityThread.java:4855)
	at java.lang.reflect.Method.invokeNative(Native Method)
	at java.lang.reflect.Method.invoke(Method.java:511)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:809)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:576)
	at dalvik.system.NativeStart.main(Native Method)
Caused by: android.content.res.Resources$NotFoundException: File res/drawable/main_tab_conversation_s.xml from drawable resource ID #0x7f0201de
	at android.content.res.Resources.loadDrawable(Resources.java:2064)
	at android.content.res.TypedArray.getDrawable(TypedArray.java:601)
	at android.widget.TextView.(TextView.java:767)
	at android.widget.Button.(Button.java:107)
	at android.widget.Button.(Button.java:103)
	... 29 more
Caused by: android.content.res.Resources$NotFoundException: File res/drawable-hdpi/tab_img1.png from drawable resource ID #0x7f02023d
	at android.content.res.Resources.loadDrawable(Resources.java:2104)
	at android.content.res.Resources.getDrawable(Resources.java:714)
	at android.graphics.drawable.StateListDrawable.inflate(StateListDrawable.java:173)
	at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:881)
	at android.graphics.drawable.Drawable.createFromXml(Drawable.java:818)
	at android.content.res.Resources.loadDrawable(Resources.java:2061)
	... 33 more
Caused by: java.io.FileNotFoundException: res/drawable-hdpi/tab_img1.png
	at android.content.res.AssetManager.openNonAssetNative(Native Method)
	at android.content.res.AssetManager.openNonAsset(AssetManager.java:420)
	at android.content.res.Resources.loadDrawable(Resources.java:2096)
	... 38 more
android.content.res.Resources$NotFoundException: File res/drawable/main_tab_conversation_s.xml from drawable resource ID #0x7f0201de
	at android.content.res.Resources.loadDrawable(Resources.java:2064)
	at android.content.res.TypedArray.getDrawable(TypedArray.java:601)
	at android.widget.TextView.(TextView.java:767)
	at android.widget.Button.(Button.java:107)
	at android.widget.Button.(Button.java:103)
	at java.lang.reflect.Constructor.constructNative(Native Method)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
	at android.view.LayoutInflater.createView(LayoutInflater.java:587)
	at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
	at android.view.LayoutInflater.onCreateView(LayoutInflater.java:660)
	at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:685)
	at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)
	at android.view.LayoutInflater.rInflate(LayoutInflater.java:749)
	at android.view.LayoutInflater.rInflate(LayoutInflater.java:749)
	at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
	at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
	at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
	at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:260)
	at android.app.Activity.setContentView(Activity.java:1903)
	at com.yckj.ycsafehelper.activity.MainActivity.onCreate(MainActivity.java:155)
	at android.app.Activity.performCreate(Activity.java:5051)
	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1101)
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2033)
	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2094)
	at android.app.ActivityThread.access$600(ActivityThread.java:135)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1205)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loop(Looper.java:137)
	at android.app.ActivityThread.main(ActivityThread.java:4855)
	at java.lang.reflect.Method.invokeNative(Native Method)
	at java.lang.reflect.Method.invoke(Method.java:511)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:809)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:576)
	at dalvik.system.NativeStart.main(Native Method)
Caused by: android.content.res.Resources$NotFoundException: File res/drawable-hdpi/tab_img1.png from drawable resource ID #0x7f02023d
	at android.content.res.Resources.loadDrawable(Resources.java:2104)
	at android.content.res.Resources.getDrawable(Resources.java:714)
	at android.graphics.drawable.StateListDrawable.inflate(StateListDrawable.java:173)
	at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:881)
	at android.graphics.drawable.Drawable.createFromXml(Drawable.java:818)
	at android.content.res.Resources.loadDrawable(Resources.java:2061)
	... 33 more
Caused by: java.io.FileNotFoundException: res/drawable-hdpi/tab_img1.png
	at android.content.res.AssetManager.openNonAssetNative(Native Method)
	at android.content.res.AssetManager.openNonAsset(AssetManager.java:420)
	at android.content.res.Resources.loadDrawable(Resources.java:2096)
	... 38 more
android.content.res.Resources$NotFoundException: File res/drawable-hdpi/tab_img1.png from drawable resource ID #0x7f02023d
	at android.content.res.Resources.loadDrawable(Resources.java:2104)
	at android.content.res.Resources.getDrawable(Resources.java:714)
	at android.graphics.drawable.StateListDrawable.inflate(StateListDrawable.java:173)
	at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:881)
	at android.graphics.drawable.Drawable.createFromXml(Drawable.java:818)
	at android.content.res.Resources.loadDrawable(Resources.java:2061)
	at android.content.res.TypedArray.getDrawable(TypedArray.java:601)
	at android.widget.TextView.(TextView.java:767)
	at android.widget.Button.(Button.java:107)
	at android.widget.Button.(Button.java:103)
	at java.lang.reflect.Constructor.constructNative(Native Method)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
	at android.view.LayoutInflater.createView(LayoutInflater.java:587)
	at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
	at android.view.LayoutInflater.onCreateView(LayoutInflater.java:660)
	at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:685)
	at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)
	at android.view.LayoutInflater.rInflate(LayoutInflater.java:749)
	at android.view.LayoutInflater.rInflate(LayoutInflater.java:749)
	at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
	at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
	at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
	at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:260)
	at android.app.Activity.setContentView(Activity.java:1903)
	at com.yckj.ycsafehelper.activity.MainActivity.onCreate(MainActivity.java:155)
	at android.app.Activity.performCreate(Activity.java:5051)
	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1101)
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2033)
	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2094)
	at android.app.ActivityThread.access$600(ActivityThread.java:135)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1205)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loop(Looper.java:137)
	at android.app.ActivityThread.main(ActivityThread.java:4855)
	at java.lang.reflect.Method.invokeNative(Native Method)
	at java.lang.reflect.Method.invoke(Method.java:511)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:809)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:576)
	at dalvik.system.NativeStart.main(Native Method)
Caused by: java.io.FileNotFoundException: res/drawable-hdpi/tab_img1.png
	at android.content.res.AssetManager.openNonAssetNative(Native Method)
	at android.content.res.AssetManager.openNonAsset(AssetManager.java:420)
	at android.content.res.Resources.loadDrawable(Resources.java:2096)
	... 38 more
java.io.FileNotFoundException: res/drawable-hdpi/tab_img1.png
	at android.content.res.AssetManager.openNonAssetNative(Native Method)
	at android.content.res.AssetManager.openNonAsset(AssetManager.java:420)
	at android.content.res.Resources.loadDrawable(Resources.java:2096)
	at android.content.res.Resources.getDrawable(Resources.java:714)
	at android.graphics.drawable.StateListDrawable.inflate(StateListDrawable.java:173)
	at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:881)
	at android.graphics.drawable.Drawable.createFromXml(Drawable.java:818)
	at android.content.res.Resources.loadDrawable(Resources.java:2061)
	at android.content.res.TypedArray.getDrawable(TypedArray.java:601)
	at android.widget.TextView.(TextView.java:767)
	at android.widget.Button.(Button.java:107)
	at android.widget.Button.(Button.java:103)
	at java.lang.reflect.Constructor.constructNative(Native Method)
	at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
	at android.view.LayoutInflater.createView(LayoutInflater.java:587)
	at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
	at android.view.LayoutInflater.onCreateView(LayoutInflater.java:660)
	at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:685)
	at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)
	at android.view.LayoutInflater.rInflate(LayoutInflater.java:749)
	at android.view.LayoutInflater.rInflate(LayoutInflater.java:749)
	at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
	at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
	at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
	at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:260)
	at android.app.Activity.setContentView(Activity.java:1903)
	at com.yckj.ycsafehelper.activity.MainActivity.onCreate(MainActivity.java:155)
	at android.app.Activity.performCreate(Activity.java:5051)
	at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1101)
	at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2033)
	at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2094)
	at android.app.ActivityThread.access$600(ActivityThread.java:135)
	at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1205)
	at android.os.Handler.dispatchMessage(Handler.java:99)
	at android.os.Looper.loop(Looper.java:137)
	at android.app.ActivityThread.main(ActivityThread.java:4855)
	at java.lang.reflect.Method.invokeNative(Native Method)
	at java.lang.reflect.Method.invoke(Method.java:511)
	at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:809)
	at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:576)
	at dalvik.system.NativeStart.main(Native Method)

Cause:图片资源放到hdpi

Solution: 将图片资源同时放到mdpi或同时配置drawable


Android学习交流群:523487222

(欢迎关注,第一时间推送博文信息)
点击链接加入群【Android学习群】


你可能感兴趣的:(android,异常)