我是一个新手 android 应用程序开发人员,真的是初学者。我尝试在 Eclipse IDE 的 xml 布局上创建一个复选框,由于某种原因,当我运行应用程序时,它只是崩溃了。
它说找不到资源。以下是logcat:
03-11 20:39:47.167: E/AndroidRuntime(24934): FATAL EXCEPTION: main
03-11 20:39:47.167: E/AndroidRuntime(24934): Process: com.example.checking, PID: 24934
03-11 20:39:47.167: E/AndroidRuntime(24934): java.lang.RuntimeException: Unable to start activity ComponentInfo{com.example.checking/com.example.checking.MainActivity}: android.view.InflateException: Binary XML file line #13: Error inflating class android.widget.CheckBox
03-11 20:39:47.167: E/AndroidRuntime(24934): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2200)
03-11 20:39:47.167: E/AndroidRuntime(24934): at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2249)
03-11 20:39:47.167: E/AndroidRuntime(24934): at android.app.ActivityThread.access$800(ActivityThread.java:141)
03-11 20:39:47.167: E/AndroidRuntime(24934): at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1212)
03-11 20:39:47.167: E/AndroidRuntime(24934): at android.os.Handler.dispatchMessage(Handler.java:102)
03-11 20:39:47.167: E/AndroidRuntime(24934): at android.os.Looper.loop(Looper.java:136)
03-11 20:39:47.167: E/AndroidRuntime(24934): at android.app.ActivityThread.main(ActivityThread.java:5052)
03-11 20:39:47.167: E/AndroidRuntime(24934): at java.lang.reflect.Method.invokeNative(Native Method)
03-11 20:39:47.167: E/AndroidRuntime(24934): at java.lang.reflect.Method.invoke(Method.java:515)
03-11 20:39:47.167: E/AndroidRuntime(24934): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
03-11 20:39:47.167: E/AndroidRuntime(24934): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:609)
03-11 20:39:47.167: E/AndroidRuntime(24934): at dalvik.system.NativeStart.main(Native Method)
03-11 20:39:47.167: E/AndroidRuntime(24934): Caused by: android.view.InflateException: Binary XML file line #13: Error inflating class android.widget.CheckBox
03-11 20:39:47.167: E/AndroidRuntime(24934): at android.view.LayoutInflater.createView(LayoutInflater.java:623)
03-11 20:39:47.167: E/AndroidRuntime(24934): at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
03-11 20:39:47.167: E/AndroidRuntime(24934): at android.view.LayoutInflater.onCreateView(LayoutInflater.java:672)
03-11 20:39:47.167: E/AndroidRuntime(24934): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:697)
03-11 20:39:47.167: E/AndroidRuntime(24934): at android.view.LayoutInflater.rInflate(LayoutInflater.java:758)
03-11 20:39:47.167: E/AndroidRuntime(24934): at android.view.LayoutInflater.inflate(LayoutInflater.java:495)
03-11 20:39:47.167: E/AndroidRuntime(24934): at android.view.LayoutInflater.inflate(LayoutInflater.java:400)
03-11 20:39:47.167: E/AndroidRuntime(24934): at android.view.LayoutInflater.inflate(LayoutInflater.java:353)
03-11 20:39:47.167: E/AndroidRuntime(24934): at com.android.internal.policy.impl.PhoneWindow.setContentView(PhoneWindow.java:290)
03-11 20:39:47.167: E/AndroidRuntime(24934): at android.app.Activity.setContentView(Activity.java:1946)
03-11 20:39:47.167: E/AndroidRuntime(24934): at com.example.checking.MainActivity.onCreate(MainActivity.java:13)
03-11 20:39:47.167: E/AndroidRuntime(24934): at android.app.Activity.performCreate(Activity.java:5248)
03-11 20:39:47.167: E/AndroidRuntime(24934): at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1087)
03-11 20:39:47.167: E/AndroidRuntime(24934): at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2164)
03-11 20:39:47.167: E/AndroidRuntime(24934): ... 11 more
03-11 20:39:47.167: E/AndroidRuntime(24934): Caused by: java.lang.reflect.InvocationTargetException
03-11 20:39:47.167: E/AndroidRuntime(24934): at java.lang.reflect.Constructor.constructNative(Native Method)
03-11 20:39:47.167: E/AndroidRuntime(24934): at java.lang.reflect.Constructor.newInstance(Constructor.java:423)
03-11 20:39:47.167: E/AndroidRuntime(24934): at android.view.LayoutInflater.createView(LayoutInflater.java:597)
03-11 20:39:47.167: E/AndroidRuntime(24934): ... 24 more
03-11 20:39:47.167: E/AndroidRuntime(24934): Caused by: android.content.res.Resources$NotFoundException: File res/drawable/abc_btn_check_material.xml from drawable resource ID #0x7f020003
03-11 20:39:47.167: E/AndroidRuntime(24934): at android.content.res.Resources.loadDrawable(Resources.java:2149)
03-11 20:39:47.167: E/AndroidRuntime(24934): at android.content.res.MiuiResources.loadDrawable(MiuiResources.java:387)
03-11 20:39:47.167: E/AndroidRuntime(24934): at android.content.res.Resources.loadDrawable(Resources.java:2072)
03-11 20:39:47.167: E/AndroidRuntime(24934): at android.content.res.TypedArray.getDrawable(TypedArray.java:602)
03-11 20:39:47.167: E/AndroidRuntime(24934): at android.widget.CompoundButton.<init>(CompoundButton.java:74)
03-11 20:39:47.167: E/AndroidRuntime(24934): at android.widget.CheckBox.<init>(CheckBox.java:68)
03-11 20:39:47.167: E/AndroidRuntime(24934): at android.widget.CheckBox.<init>(CheckBox.java:64)
03-11 20:39:47.167: E/AndroidRuntime(24934): ... 27 more
03-11 20:39:47.167: E/AndroidRuntime(24934): Caused by: android.content.res.Resources$NotFoundException: File res/drawable-v11/abc_btn_checkbox_checked_mtrl.xml from drawable resource ID #0x7f020004
03-11 20:39:47.167: E/AndroidRuntime(24934): at android.content.res.Resources.loadDrawable(Resources.java:2149)
03-11 20:39:47.167: E/AndroidRuntime(24934): at android.content.res.MiuiResources.loadDrawable(MiuiResources.java:387)
03-11 20:39:47.167: E/AndroidRuntime(24934): at android.content.res.Resources.loadDrawable(Resources.java:2072)
03-11 20:39:47.167: E/AndroidRuntime(24934): at android.content.res.Resources.getDrawable(Resources.java:710)
03-11 20:39:47.167: E/AndroidRuntime(24934): at android.graphics.drawable.StateListDrawable.inflate(StateListDrawable.java:176)
03-11 20:39:47.167: E/AndroidRuntime(24934): at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:939)
03-11 20:39:47.167: E/AndroidRuntime(24934): at android.graphics.drawable.Drawable.createFromXml(Drawable.java:879)
03-11 20:39:47.167: E/AndroidRuntime(24934): at android.content.res.Resources.createFromXml(Resources.java:2525)
03-11 20:39:47.167: E/AndroidRuntime(24934): at android.content.res.Resources.loadDrawable(Resources.java:2145)
03-11 20:39:47.167: E/AndroidRuntime(24934): ... 33 more
03-11 20:39:47.167: E/AndroidRuntime(24934): Caused by: org.xmlpull.v1.XmlPullParserException: Binary XML file line #17: invalid drawable tag vector
03-11 20:39:47.167: E/AndroidRuntime(24934): at android.graphics.drawable.Drawable.createFromXmlInner(Drawable.java:9
有人可以帮我解决这个问题。