log cat
01-16 20:29:48.904: D/dalvikvm(1008): GC_FOR_ALLOC freed 37K, 7% free 2585K/2768K, paused 110ms, total 113ms
01-16 20:29:48.944: D/AndroidRuntime(1008): Shutting down VM
01-16 20:29:48.944: W/dalvikvm(1008): threadid=1: thread exiting with uncaught exception (group=0x40a71930)
01-16 20:29:48.984: E/AndroidRuntime(1008): FATAL EXCEPTION: main
01-16 20:29:48.984: E/AndroidRuntime(1008): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.cuet.teachersroom/com.cuet.teachersroom.Teachers_Room}: android.view.InflateException: Binary XML file line #20: Error inflating class <unknown>
01-16 20:29:48.984: E/AndroidRuntime(1008): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2180)
01-16 20:29:48.984: E/AndroidRuntime(1008): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2230)
01-16 20:29:48.984: E/AndroidRuntime(1008): at android.app.ActivityThread.access$600(ActivityThread.java:141)
01-16 20:29:48.984: E/AndroidRuntime(1008): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1234)
01-16 20:29:48.984: E/AndroidRuntime(1008): at android.os.Handler.dispatchMessage(Handler.java:99)
01-16 20:29:48.984: E/AndroidRuntime(1008): at android.os.Looper.loop(Looper.java:137)
01-16 20:29:48.984: E/AndroidRuntime(1008): at android.app.ActivityThread.main(ActivityThread.java:5041)
01-16 20:29:48.984: E/AndroidRuntime(1008): at java.lang.reflect.Method.invokeNative(Native Method)
01-16 20:29:48.984: E/AndroidRuntime(1008): at java.lang.reflect.Method.invoke(Method.java:511)
01-16 20:29:48.984: E/AndroidRuntime(1008): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
01-16 20:29:48.984: E/AndroidRuntime(1008): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:560)
01-16 20:29:48.984: E/AndroidRuntime(1008): at dalvik.system.NativeStart.main(Native Method)
01-16 20:29:48.984: E/AndroidRuntime(1008): Caused by: android.view.InflateException: Binary XML file line #20: Error inflating class <unknown>
01-16 20:29:48.984: E/AndroidRuntime(1008): at android.view.LayoutInflater.createView(LayoutInflater.java:613)
01-16 20:29:48.984: E/AndroidRuntime(1008): at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
01-16 20:29:48.984: E/AndroidRuntime(1008): at android.view.LayoutInflater.onCreateView(LayoutInflater.java:660)
01-16 20:29:48.984: E/AndroidRuntime(1008): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:685)
01-16 20:29:48.984: E/AndroidRuntime(1008): at android.view.LayoutInflater.rInflate(LayoutInflater.java:746)
01-16 20:29:48.984: E/AndroidRuntime(1008): at android.view.LayoutInflater.rInflate(LayoutInflater.java:749)
01-16 20:29:48.984: E/AndroidRuntime(1008): at android.view.LayoutInflater.rInflate(LayoutInflater.java:749)
01-16 20:29:48.984: E/AndroidRuntime(1008): at android.view.LayoutInflater.inflate(LayoutInflater.java:489)
01-16 20:29:48.984: E/AndroidRuntime(1008): at android.view.LayoutInflater.inflate(LayoutInflater.java:396)
01-16 20:29:48.984: E/AndroidRuntime(1008): at android.view.LayoutInflater.inflate(LayoutInflater.java:352)
01-16 20:29:48.984: E/AndroidRuntime(1008): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:270)
01-16 20:29:48.984: E/AndroidRuntime(1008): at android.app.Activity.setContentView(Activity.java:1881)
01-16 20:29:48.984: E/AndroidRuntime(1008): at com.cuet.teachersroom.Teachers_Room.onCreate(Teachers_Room.java:38)
01-16 20:29:48.984: E/AndroidRuntime(1008): at android.app.Activity.performCreate(Activity.java:5104)
01-16 20:29:48.984: E/AndroidRuntime(1008): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1080)
01-16 20:29:48.984: E/AndroidRuntime(1008): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2144)
01-16 20:29:48.984: E/AndroidRuntime(1008): ... 11 more
01-16 20:29:48.984: E/AndroidRuntime(1008): Caused by: java.lang.reflect.InvocationTargetException
01-16 20:29:48.984: E/AndroidRuntime(1008): at java.lang.reflect.Constructor.constructNative(Native Method)
01-16 20:29:48.984: E/AndroidRuntime(1008): at java.lang.reflect.Constructor.newInstance(Constructor.java:417)
01-16 20:29:48.984: E/AndroidRuntime(1008): at android.view.LayoutInflater.createView(LayoutInflater.java:587)
01-16 20:29:48.984: E/AndroidRuntime(1008): ... 26 more
01-16 20:29:48.984: E/AndroidRuntime(1008): Caused by: android.content.res.Resources$NotFoundException: File res/drawable-mdpi/white.png from drawable resource ID #0x7f020005: .xml extension required
01-16 20:29:48.984: E/AndroidRuntime(1008): at android.content.res.Resources.loadColorStateList(Resources.java:2094)
01-16 20:29:48.984: E/AndroidRuntime(1008): at android.content.res.TypedArray.getColorStateList(TypedArray.java:342)
01-16 20:29:48.984: E/AndroidRuntime(1008): at android.widget.TextView.<init>(TextView.java:904)
01-16 20:29:48.984: E/AndroidRuntime(1008): at android.widget.TextView.<init>(TextView.java:578)
01-16 20:29:48.984: E/AndroidRuntime(1008): ... 29 more
01-16 20:29:49.166: D/dalvikvm(1008): GC_CONCURRENT freed 508K, 21% free 2500K/3152K, paused 12ms+7ms, total 166ms
答案 0 :(得分:0)
您的错误日志显示在为您的某个类充气时出现未知错误。
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.cuet.teachersroom/com.cuet.teachersroom.Teachers_Room}: android.view.InflateException: Binary XML file line #20: Error inflating class <unknown>
所以我们真的需要看看com.cuet.teachersroom.Teachers_Room正在调用的相关xml文件,看看发生了什么。