在首页分屏会崩溃
Closed this issue · 1 comments
qwwuyu commented
2020-06-09 16:46:05.036 21624-21624/com.win.wan_android E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.win.wan_android, PID: 21624
java.lang.RuntimeException: Unable to start activity ComponentInfo{com.win.wan_android/com.win.ft_home.ui.main.MainActivity}: android.view.InflateException: Binary XML file line #14 in com.win.wan_android:layout/activity_main: Binary XML file line #14 in com.win.wan_android:layout/activity_main: Error inflating class fragment
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3760)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3939)
at android.app.ActivityThread.handleRelaunchActivityInner(ActivityThread.java:5908)
at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:5798)
at android.app.servertransaction.ActivityRelaunchItem.execute(ActivityRelaunchItem.java:69)
at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:149)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:103)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2373)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:213)
at android.app.ActivityThread.main(ActivityThread.java:8147)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1101)
Caused by: android.view.InflateException: Binary XML file line #14 in com.win.wan_android:layout/activity_main: Binary XML file line #14 in com.win.wan_android:layout/activity_main: Error inflating class fragment
Caused by: android.view.InflateException: Binary XML file line #14 in com.win.wan_android:layout/activity_main: Error inflating class fragment
Caused by: java.lang.IllegalStateException: Fragment com.win.lib_base.window.WindowNavHostFragment did not create a view.
at androidx.fragment.app.FragmentLayoutInflaterFactory.onCreateView(FragmentLayoutInflaterFactory.java:139)
at androidx.fragment.app.FragmentController.onCreateView(FragmentController.java:135)
at androidx.fragment.app.FragmentActivity.dispatchFragmentsOnCreateView(FragmentActivity.java:356)
at androidx.fragment.app.FragmentActivity.onCreateView(FragmentActivity.java:335)
at android.view.LayoutInflater.tryCreateView(LayoutInflater.java:1079)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:1007)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:971)
at android.view.LayoutInflater.rInflate(LayoutInflater.java:1133)
at android.view.LayoutInflater.rInflateChildren(LayoutInflater.java:1094)
at android.view.LayoutInflater.inflate(LayoutInflater.java:692)
at android.view.LayoutInflater.inflate(LayoutInflater.java:536)
at android.view.LayoutInflater.inflate(LayoutInflater.java:483)
at androidx.appcompat.app.AppCompatDelegateImpl.setContentView(AppCompatDelegateImpl.java:555)
at androidx.appcompat.app.AppCompatActivity.setContentView(AppCompatActivity.java:161)
at androidx.databinding.DataBindingUtil.setContentView(DataBindingUtil.java:303)
at androidx.databinding.DataBindingUtil.setContentView(DataBindingUtil.java:284)
at com.win.lib_base.base.BaseActivity.onCreate(BaseActivity.kt:23)
at com.win.ft_home.ui.main.MainActivity.onCreate(MainActivity.kt:23)
at android.app.Activity.performCreate(Activity.java:8066)
at android.app.Activity.performCreate(Activity.java:8054)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1313)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:3733)
at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3939)
at android.app.ActivityThread.handleRelaunchActivityInner(ActivityThread.java:5908)
at android.app.ActivityThread.handleRelaunchActivity(ActivityThread.java:5798)
at android.app.servertransaction.ActivityRelaunchItem.execute(ActivityRelaunchItem.java:69)
2020-06-09 16:46:05.037 21624-21624/com.win.wan_android E/AndroidRuntime: at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:149)
at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:103)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:2373)
at android.os.Handler.dispatchMessage(Handler.java:107)
at android.os.Looper.loop(Looper.java:213)
at android.app.ActivityThread.main(ActivityThread.java:8147)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:513)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1101)
winlee28 commented
将首页配置为不重建