我已將YouTubePlayerView庫集成到我們的應用程序中,並且它的工作完美無缺,但每當我將應用程序最小化時,它都會崩潰,或者當應用程序在後臺崩潰時說。當應用程序被最小化時,YouTubePlayerView的活動崩潰
這裏是崩潰日誌:
java.lang.NoClassDefFoundError: rt
at rs.<clinit>(SourceFile:17)
at android.support.v7.widget.RecyclerView.onSaveInstanceState(SourceFile:201)
at android.view.View.dispatchSaveInstanceState(View.java:12985)
at android.view.ViewGroup.dispatchFreezeSelfOnly(ViewGroup.java:2643)
at android.support.v7.widget.RecyclerView.dispatchSaveInstanceState(SourceFile:220)
at android.view.ViewGroup.dispatchSaveInstanceState(ViewGroup.java:2629)
at android.view.ViewGroup.dispatchSaveInstanceState(ViewGroup.java:2629)
at android.view.ViewGroup.dispatchSaveInstanceState(ViewGroup.java:2629)
at android.view.ViewGroup.dispatchSaveInstanceState(ViewGroup.java:2629)
at android.view.ViewGroup.dispatchSaveInstanceState(ViewGroup.java:2629)
at android.view.ViewGroup.dispatchSaveInstanceState(ViewGroup.java:2629)
at android.view.ViewGroup.dispatchSaveInstanceState(ViewGroup.java:2629)
at android.view.View.saveHierarchyState(View.java:12968)
at com.android.internal.policy.impl.PhoneWindow.saveHierarchyState(PhoneWindow.java:1705)
at android.app.Activity.onSaveInstanceState(Activity.java:1277)
at com.google.android.youtube.player.YouTubeBaseActivity.onSaveInstanceState(Unknown Source)
at android.app.Activity.performSaveInstanceState(Activity.java:1226)
at android.app.Instrumentation.callActivityOnSaveInstanceState(Instrumentation.java:1223)
at android.app.ActivityThread.performStopActivityInner(ActivityThread.java:3342)
at android.app.ActivityThread.handleStopActivity(ActivityThread.java:3401)
at android.app.ActivityThread.access$1100(ActivityThread.java:139)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1320)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:149)
at android.app.ActivityThread.main(ActivityThread.java:5257)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:609)
at dalvik.system.NativeStart.main(Native Method)
07-03 13:02:44.608 31106-31174/com.seeken D/FA: Logging event (FE): _ae, Bundle[{_o=crash, timestamp=1499067164609, fatal=1}]
07-03 13:02:44.808 31106-31106/com.seeken I/dalvikvm: Could not find method java.util.Locale.toLanguageTag, referenced from method bme.a
07-03 13:02:44.808 31106-31106/com.seeken W/dalvikvm: VFY: unable to resolve virtual method 10275: Ljava/util/Locale;.toLanguageTag()Ljava/lang/String;
07-03 13:02:44.808 31106-31106/com.seeken D/dalvikvm: VFY: replacing opcode 0x6e at 0x00e4
07-03 13:02:44.848 31106-31106/com.seeken D/dalvikvm: GC_FOR_ALLOC freed 3454K, 15% free 20646K/24152K, paused 25ms, total 25ms
07-03 13:02:44.868 31106-31106/com.seeken E/AndroidRuntime: FATAL EXCEPTION: main
Process: com.seeken, PID: 31106
java.lang.NoClassDefFoundError: rt
at rs.<clinit>(SourceFile:17)
at android.support.v7.widget.RecyclerView.onSaveInstanceState(SourceFile:201)
at android.view.View.dispatchSaveInstanceState(View.java:12985)
at android.view.ViewGroup.dispatchFreezeSelfOnly(ViewGroup.java:2643)
at android.support.v7.widget.RecyclerView.dispatchSaveInstanceState(SourceFile:220)
at android.view.ViewGroup.dispatchSaveInstanceState(ViewGroup.java:2629)
at android.view.ViewGroup.dispatchSaveInstanceState(ViewGroup.java:2629)
at android.view.ViewGroup.dispatchSaveInstanceState(ViewGroup.java:2629)
at android.view.ViewGroup.dispatchSaveInstanceState(ViewGroup.java:2629)
at android.view.ViewGroup.dispatchSaveInstanceState(ViewGroup.java:2629)
at android.view.ViewGroup.dispatchSaveInstanceState(ViewGroup.java:2629)
at android.view.ViewGroup.dispatchSaveInstanceState(ViewGroup.java:2629)
at android.view.View.saveHierarchyState(View.java:12968)
at com.android.internal.policy.impl.PhoneWindow.saveHierarchyState(PhoneWindow.java:1705)
at android.app.Activity.onSaveInstanceState(Activity.java:1277)
at com.google.android.youtube.player.YouTubeBaseActivity.onSaveInstanceState(Unknown Source)
at android.app.Activity.performSaveInstanceState(Activity.java:1226)
at android.app.Instrumentation.callActivityOnSaveInstanceState(Instrumentation.java:1223)
at android.app.ActivityThread.performStopActivityInner(ActivityThread.java:3342)
at android.app.ActivityThread.handleStopActivity(ActivityThread.java:3401)
at android.app.ActivityThread.access$1100(ActivityThread.java:139)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1320)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:149)
at android.app.ActivityThread.main(ActivityThread.java:5257)
at java.lang.reflect.Method.invokeNative(Native Method)
at java.lang.reflect.Method.invoke(Method.java:515)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:793)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:609)
at dalvik.system.NativeStart.main(Native Method)
這裏是我的清單:
<activity android:name=".activities.VideoActivity"
android:configChanges="orientation|screenLayout|screenSize"/>
我已經添加了'機器人:configChanges = 「方向|屏幕布置|屏幕尺寸」'這個清單中,但仍然面臨着問題的代碼。請檢查。 –