我遇到了设计库 23.1.0 的问题
我尝试将设计库从 23.0.1 更新到 23.1.0,但现在我的应用程序在尝试为我的 navigationView 充气时崩溃。
如果我没记错的话,这两个版本之间的导航视图不应该有任何重大变化。
我尝试将我的代码与 cheesesquare 项目(https://github.com/chrisbanes/cheesesquare)进行比较,但我找不到任何真正的区别。
如果需要更多信息,我会提供。
崩溃发生在我的活动中setContentView(R.layout.myLayout)
我的 XML 是这样的
<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.DrawerLayout
xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
android:id="@+id/drawer"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:fitsSystemWindows="true">
<LinearLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:orientation="vertical">
<include layout="@layout/toolbar" />
<FrameLayout
android:id="@+id/container"
android:layout_width="match_parent"
android:layout_height="match_parent" />
</LinearLayout>
<android.support.design.widget.NavigationView
android:id="@+id/navigation"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_gravity="start"
android:fitsSystemWindows="true"
app:headerLayout="@layout/navigation_header"
app:menu="@menu/navigation_items" />
</android.support.v4.widget.DrawerLayout>
崩溃日志很长且不完整:
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: FATAL EXCEPTION: main
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: Process: be.myApp, PID: 10085
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: java.lang.RuntimeException: Unable to start activity ComponentInfo{be.myApp/be.myApp.home.SyndicHomeActivity}: android.view.InflateException: Binary XML file line #22: Binary XML file line #22: Error inflating class android.support.design.widget.NavigationView
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2416)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.app.ActivityThread.-wrap11(ActivityThread.java)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.os.Looper.loop(Looper.java:148)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5417)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: Caused by: android.view.InflateException: Binary XML file line #22: Binary XML file line #22: Error inflating class android.support.design.widget.NavigationView
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.view.LayoutInflater.inflate(LayoutInflater.java:539)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:257)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:109)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at be.myApp.home.SyndicHomeActivity.onCreate(SyndicHomeActivity.java:39)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.app.Activity.performCreate(Activity.java:6237)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.app.ActivityThread.-wrap11(ActivityThread.java)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.os.Looper.loop(Looper.java:148)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5417)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: Caused by: android.view.InflateException: Binary XML file line #22: Error inflating class android.support.design.widget.NavigationView
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.view.LayoutInflater.createView(LayoutInflater.java:645)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:764)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.view.LayoutInflater.rInflate(LayoutInflater.java:835)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.view.LayoutInflater.inflate(LayoutInflater.java:515)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:257)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:109)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at be.myApp.home.SyndicHomeActivity.onCreate(SyndicHomeActivity.java:39)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.app.Activity.performCreate(Activity.java:6237)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.app.ActivityThread.-wrap11(ActivityThread.java)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.os.Looper.loop(Looper.java:148)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5417)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: Caused by: java.lang.reflect.InvocationTargetException
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at java.lang.reflect.Constructor.newInstance(Native Method)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.view.LayoutInflater.createView(LayoutInflater.java:619)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:764)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.view.LayoutInflater.rInflate(LayoutInflater.java:835)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.view.LayoutInflater.inflate(LayoutInflater.java:515)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:257)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:109)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at be.myApp.home.SyndicHomeActivity.onCreate(SyndicHomeActivity.java:39)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.app.Activity.performCreate(Activity.java:6237)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.app.ActivityThread.-wrap11(ActivityThread.java)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.os.Looper.loop(Looper.java:148)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5417)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: Caused by: android.view.InflateException: Binary XML file line #17: Binary XML file line #17: Error inflating class android.support.design.internal.NavigationMenuView
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.view.LayoutInflater.inflate(LayoutInflater.java:539)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.support.design.internal.NavigationMenuPresenter.getMenuView(NavigationMenuPresenter.java:97)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.support.design.widget.NavigationView.<init>(NavigationView.java:165)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.support.design.widget.NavigationView.<init>(NavigationView.java:94)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at java.lang.reflect.Constructor.newInstance(Native Method)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.view.LayoutInflater.createView(LayoutInflater.java:619)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:764)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.view.LayoutInflater.rInflate(LayoutInflater.java:835)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.view.LayoutInflater.inflate(LayoutInflater.java:515)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:257)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:109)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at be.myApp.home.SyndicHomeActivity.onCreate(SyndicHomeActivity.java:39)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.app.Activity.performCreate(Activity.java:6237)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.app.ActivityThread.-wrap11(ActivityThread.java)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.os.Looper.loop(Looper.java:148)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5417)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: Caused by: android.view.InflateException: Binary XML file line #17: Error inflating class android.support.design.internal.NavigationMenuView
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.view.LayoutInflater.createView(LayoutInflater.java:645)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:764)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.support.design.internal.NavigationMenuPresenter.getMenuView(NavigationMenuPresenter.java:97)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.support.design.widget.NavigationView.<init>(NavigationView.java:165)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.support.design.widget.NavigationView.<init>(NavigationView.java:94)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at java.lang.reflect.Constructor.newInstance(Native Method)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.view.LayoutInflater.createView(LayoutInflater.java:619)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:764)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.view.LayoutInflater.rInflate(LayoutInflater.java:835)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.view.LayoutInflater.inflate(LayoutInflater.java:515)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:257)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:109)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at be.myApp.home.SyndicHomeActivity.onCreate(SyndicHomeActivity.java:39)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.app.Activity.performCreate(Activity.java:6237)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.app.ActivityThread.-wrap11(ActivityThread.java)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.os.Looper.loop(Looper.java:148)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5417)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: Caused by: java.lang.reflect.InvocationTargetException
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at java.lang.reflect.Constructor.newInstance(Native Method)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.view.LayoutInflater.createView(LayoutInflater.java:619)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:764)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.view.LayoutInflater.inflate(LayoutInflater.java:492)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.support.design.internal.NavigationMenuPresenter.getMenuView(NavigationMenuPresenter.java:97)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.support.design.widget.NavigationView.<init>(NavigationView.java:165)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.support.design.widget.NavigationView.<init>(NavigationView.java:94)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at java.lang.reflect.Constructor.newInstance(Native Method)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.view.LayoutInflater.createView(LayoutInflater.java:619)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:764)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:704)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.view.LayoutInflater.rInflate(LayoutInflater.java:835)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:798)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.view.LayoutInflater.inflate(LayoutInflater.java:515)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.view.LayoutInflater.inflate(LayoutInflater.java:423)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.view.LayoutInflater.inflate(LayoutInflater.java:374)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.support.v7.app.AppCompatDelegateImplV7.setContentView(AppCompatDelegateImplV7.java:257)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.support.v7.app.AppCompatActivity.setContentView(AppCompatActivity.java:109)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at be.myApp.home.SyndicHomeActivity.onCreate(SyndicHomeActivity.java:39)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.app.Activity.performCreate(Activity.java:6237)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1107)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2369)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2476)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.app.ActivityThread.-wrap11(ActivityThread.java)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1344)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.os.Handler.dispatchMessage(Handler.java:102)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.os.Looper.loop(Looper.java:148)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.app.ActivityThread.main(ActivityThread.java:5417)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at java.lang.reflect.Method.invoke(Native Method)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: Caused by: java.lang.IllegalStateException: Binary XML file line #17: Error creating LayoutManager android.support.v7.widget.LinearLayoutManager
10-24 20:57:47.314 10085-10085/be.myApp E/AndroidRuntime: at android.support.v7.widget.RecyclerView.createLayoutMan
更新:
显然这是proguard的问题。
我还没有找到需要什么规则。