我在 mainActivity 的 XML 中添加了 MiniControllerFrament,每当应用程序启动时,它都会因以下日志而崩溃(在 Google Pixel 4a 设备上测试)
2022-01-27 20:06:08.063 21050-21050/? E/AndroidRuntime:
at com.vuclip.viu.CastMiniController.onCreateView(CastMiniController.kt:11)
at androidx.fragment.app.Fragment.performCreateView(Fragment.java:2995)
at androidx.fragment.app.FragmentStateManager.ensureInflatedView(FragmentStateManager.java:388)
at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:260)
at androidx.fragment.app.FragmentLayoutInflaterFactory.onCreateView(FragmentLayoutInflaterFactory.java:142)
at android.view.LayoutInflater$FactoryMerger.onCreateView(LayoutInflater.java:241)
at android.view.LayoutInflater.tryCreateView(LayoutInflater.java:1065)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:1001)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:965)
at android.view.LayoutInflater.inflate(LayoutInflater.java:663)
at android.view.LayoutInflater.inflate(LayoutInflater.java:538)
at android.view.LayoutInflater.inflate(LayoutInflater.java:485)
at com.google.android.gms.cast.framework.media.widget.MiniControllerFragment.onCreateView(com.google.android.gms:play-services-cast-framework@@20.1.0:2)
at com.vuclip.viu.CastMiniController.onCreateView(CastMiniController.kt:11)
at androidx.fragment.app.Fragment.performCreateView(Fragment.java:2995)
at androidx.fragment.app.FragmentStateManager.ensureInflatedView(FragmentStateManager.java:388)
at androidx.fragment.app.FragmentStateManager.moveToExpectedState(FragmentStateManager.java:260)
at androidx.fragment.app.FragmentLayoutInflaterFactory.onCreateView(FragmentLayoutInflaterFactory.java:142)
at android.view.LayoutInflater$FactoryMerger.onCreateView(LayoutInflater.java:241)
at android.view.LayoutInflater.tryCreateView(LayoutInflater.java:1065)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:1001)
at android.view.LayoutInflater.createViewFromTag(LayoutInflater.java:965)
at android.view.LayoutInflater.inflate(LayoutInflater.java:663)
at android.view.LayoutInflater.inflate(LayoutInflater.java:538)
at android.view.LayoutInflater.inflate(LayoutInflater.java:485)
at com.google.android.gms.cast.framework.media.widget.MiniControllerFragment.onCreateView(com.google.android.gms:play-services-cast-framework@@20.1.0:2)
at com.vuclip.viu.CastMiniController.onCreateView(CastMiniController.kt:11)