我将ActionBarCompat
和NavDrawer
添加到我的项目中,在运行4.3设备上很流畅,但在2.3设备上会出现以下异常:
09-08 15:09:15.229: E/AndroidRuntime(2964): FATAL EXCEPTION: main
09-08 15:09:15.229: E/AndroidRuntime(2964): android.view.InflateException: Binary XML file line #1: Error inflating class <unknown>
09-08 15:09:15.229: E/AndroidRuntime(2964): at android.view.LayoutInflater.createView(LayoutInflater.java:518)
09-08 15:09:15.229: E/AndroidRuntime(2964): at com.android.internal.policy.impl.PhoneLayoutInflater.onCreateView(PhoneLayoutInflater.java:56)
09-08 15:09:15.229: E/AndroidRuntime(2964): at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:568)
09-08 15:09:15.229: E/AndroidRuntime(2964): at android.view.LayoutInflater.inflate(LayoutInflater.java:386)
09-08 15:09:15.229: E/AndroidRuntime(2964): at android.view.LayoutInflater.inflate(LayoutInflater.java:320)
09-08 15:09:15.229: E/AndroidRuntime(2964): at android.widget.ArrayAdapter.createViewFromResource(ArrayAdapter.java:332)
09-08 15:09:15.229: E/AndroidRuntime(2964): at android.widget.ArrayAdapter.getView(ArrayAdapter.java:323)
09-08 15:09:15.229: E/AndroidRuntime(2964): at android.widget.AbsListView.obtainView(AbsListView.java:1582)
09-08 15:09:15.229: E/AndroidRuntime(2964): at android.widget.ListView.makeAndAddView(ListView.java:1801)
09-08 15:09:15.229: E/AndroidRuntime(2964): at android.widget.ListView.fillDown(ListView.java:724)
09-08 15:09:15.229: E/AndroidRuntime(2964): at android.widget.ListView.fillFromTop(ListView.java:781)
09-08 15:09:15.229: E/AndroidRuntime(2964): at android.widget.ListView.layoutChildren(ListView.java:1652)
09-08 15:09:15.229: E/AndroidRuntime(2964): at android.widget.AbsListView.onLayout(AbsListView.java:1412)
09-08 15:09:15.229: E/AndroidRuntime(2964): at android.view.View.layout(View.java:7175)
09-08 15:09:15.229: E/AndroidRuntime(2964): at android.support.v4.widget.DrawerLayout.onLayout(DrawerLayout.java:702)
09-08 15:09:15.229: E/AndroidRuntime(2964): at android.view.View.layout(View.java:7175)
09-08 15:09:15.229: E/AndroidRuntime(2964): at android.widget.FrameLayout.onLayout(FrameLayout.java:338)
09-08 15:09:15.229: E/AndroidRuntime(2964): at android.view.View.layout(View.java:7175)
09-08 15:09:15.229: E/AndroidRuntime(2964): at android.widget.LinearLayout.setChildFrame(LinearLayout.java:1254)
09-08 15:09:15.229: E/AndroidRuntime(2964): at android.widget.LinearLayout.layoutVertical(LinearLayout.java:1130)
09-08 15:09:15.229: E/AndroidRuntime(2964): at android.widget.LinearLayout.onLayout(LinearLayout.java:1047)
09-08 15:09:15.229: E/AndroidRuntime(2964): at android.view.View.layout(View.java:7175)
09-08 15:09:15.229: E/AndroidRuntime(2964): at android.widget.FrameLayout.onLayout(FrameLayout.java:338)
09-08 15:09:15.229: E/AndroidRuntime(2964): at android.view.View.layout(View.java:7175)
09-08 15:09:15.229: E/AndroidRuntime(2964): at android.widget.FrameLayout.onLayout(FrameLayout.java:338)
09-08 15:09:15.229: E/AndroidRuntime(2964): at android.view.View.layout(View.java:7175)
09-08 15:09:15.229: E/AndroidRuntime(2964): at android.view.ViewRoot.performTraversals(ViewRoot.java:1146)
09-08 15:09:15.229: E/AndroidRuntime(2964): at android.view.ViewRoot.handleMessage(ViewRoot.java:1866)
09-08 15:09:15.229: E/AndroidRuntime(2964): at android.os.Handler.dispatchMessage(Handler.java:99)
09-08 15:09:15.229: E/AndroidRuntime(2964): at android.os.Looper.loop(Looper.java:130)
09-08 15:09:15.229: E/AndroidRuntime(2964): at android.app.ActivityThread.main(ActivityThread.java:3687)
09-08 15:09:15.229: E/AndroidRuntime(2964): at java.lang.reflect.Method.invokeNative(Native Method)
09-08 15:09:15.229: E/AndroidRuntime(2964): at java.lang.reflect.Method.invoke(Method.java:507)
09-08 15:09:15.229: E/AndroidRuntime(2964): at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:867)
09-08 15:09:15.229: E/AndroidRuntime(2964): at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:625)
09-08 15:09:15.229: E/AndroidRuntime(2964): at dalvik.system.NativeStart.main(Native Method)
09-08 15:09:15.229: E/AndroidRuntime(2964): Caused by: java.lang.reflect.InvocationTargetException
09-08 15:09:15.229: E/AndroidRuntime(2964): at java.lang.reflect.Constructor.constructNative(Native Method)
09-08 15:09:15.229: E/AndroidRuntime(2964): at java.lang.reflect.Constructor.newInstance(Constructor.java:415)
09-08 15:09:15.229: E/AndroidRuntime(2964): at android.view.LayoutInflater.createView(LayoutInflater.java:505)
09-08 15:09:15.229: E/AndroidRuntime(2964): ... 35 more
09-08 15:09:15.229: E/AndroidRuntime(2964): Caused by: android.content.res.Resources$NotFoundException: Resource is not a Drawable (color or path): TypedValue{t=0x2/d=0x10102fd a=-1}
09-08 15:09:15.229: E/AndroidRuntime(2964): at android.content.res.Resources.loadDrawable(Resources.java:1681)
09-08 15:09:15.229: E/AndroidRuntime(2964): at android.content.res.TypedArray.getDrawable(TypedArray.java:601)
09-08 15:09:15.229: E/AndroidRuntime(2964): at android.view.View.<init>(View.java:1951)
09-08 15:09:15.229: E/AndroidRuntime(2964): at android.widget.TextView.<init>(TextView.java:389)
09-08 15:09:15.229: E/AndroidRuntime(2964): at android.widget.TextView.<init>(TextView.java:382)
09-08 15:09:15.229: E/AndroidRuntime(2964): ... 38 more
我已经按照手册的要求设置了一切,并安装了正确的支持包等...
有什么想法吗? 如何确定罪魁祸首的XML文件?