gpt4 book ai didi

java - 在 Youtube Player API 中出现大量崩溃

转载 作者:塔克拉玛干 更新时间:2023-11-02 23:31:46 25 4
gpt4 key购买 nike

我已经在 android 应用程序中实现了 youtube 播放器 api。

我在播放视频时经常遇到以下崩溃:

08-03 11:18:25.289 15393 15393 E AndroidRuntime: java.lang.NullPointerException: Attempt to invoke virtual method 'void iqe.a(boolean)' on a null object reference
08-03 11:18:25.289 15393 15393 E AndroidRuntime: at ioy.onFilterTouchEventForSecurity(SourceFile:115)
08-03 11:18:25.289 15393 15393 E AndroidRuntime: at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2091)
08-03 11:18:25.289 15393 15393 E AndroidRuntime: at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2561)
08-03 11:18:25.289 15393 15393 E AndroidRuntime: at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2199)
08-03 11:18:25.289 15393 15393 E AndroidRuntime: at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2561)
08-03 11:18:25.289 15393 15393 E AndroidRuntime: at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2199)
08-03 11:18:25.289 15393 15393 E AndroidRuntime: at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2561)
08-03 11:18:25.289 15393 15393 E AndroidRuntime: at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2199)
08-03 11:18:25.289 15393 15393 E AndroidRuntime: at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2561)
08-03 11:18:25.289 15393 15393 E AndroidRuntime: at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2199)
08-03 11:18:25.289 15393 15393 E AndroidRuntime: at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2561)
08-03 11:18:25.289 15393 15393 E AndroidRuntime: at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2199)
08-03 11:18:25.289 15393 15393 E AndroidRuntime: at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2561)
08-03 11:18:25.289 15393 15393 E AndroidRuntime: at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2199)
08-03 11:18:25.289 15393 15393 E AndroidRuntime: at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2561)
08-03 11:18:25.289 15393 15393 E AndroidRuntime: at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2199)
08-03 11:18:25.289 15393 15393 E AndroidRuntime: at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2561)
08-03 11:18:25.289 15393 15393 E AndroidRuntime: at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2199)
08-03 11:18:25.289 15393 15393 E AndroidRuntime: at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2561)
08-03 11:18:25.289 15393 15393 E AndroidRuntime: at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2199)
08-03 11:18:25.289 15393 15393 E AndroidRuntime: at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2561)
08-03 11:18:25.289 15393 15393 E AndroidRuntime: at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2199)
08-03 11:18:25.289 15393 15393 E AndroidRuntime: at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2561)
08-03 11:18:25.289 15393 15393 E AndroidRuntime: at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2199)
08-03 11:18:25.289 15393 15393 E AndroidRuntime: at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2561)
08-03 11:18:25.289 15393 15393 E AndroidRuntime: at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2199)
08-03 11:18:25.289 15393 15393 E AndroidRuntime: at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2561)
08-03 11:18:25.289 15393 15393 E AndroidRuntime: at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2199)
08-03 11:18:25.289 15393 15393 E AndroidRuntime: at com.android.internal.policy.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:2419)
08-03 11:18:25.289 15393 15393 E AndroidRuntime: at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1744)
08-03 11:18:25.289 15393 15393 E AndroidRuntime: at android.app.Activity.dispatchTouchEvent(Activity.java:2771)
08-03 11:18:25.289 15393 15393 E AndroidRuntime: at android.support.v7.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:71)
08-03 11:18:25.289 15393 15393 E AndroidRuntime: at android.support.v7.view.WindowCallbackWrapper.dispatchTouchEvent(WindowCallbackWrapper.java:71)
08-03 11:18:25.289 15393 15393 E AndroidRuntime: at com.android.internal.policy.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:2380)
08-03 11:18:25.289 15393 15393 E AndroidRuntime: at android.view.View.dispatchPointerEvent(View.java:9529)
08-03 11:18:25.289 15393 15393 E AndroidRuntime: at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:4230)
08-03 11:18:25.289 15393 15393 E AndroidRuntime: at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:4096)
08-03 11:18:25.289 15393 15393 E AndroidRuntime: at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3642)
08-03 11:18:25.289 15393 15393 E AndroidRuntime: at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3695)
08-03 11:18:25.289 15393 15393 E AndroidRuntime: at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3661)
08-03 11:18:25.289 15393 15393 E AndroidRuntime: at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:3787)
08-03 11:18:25.289 15393 15393 E AndroidRuntime: at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3669)
08-03 11:18:25.289 15393 15393 E AndroidRuntime: at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:3844)
08-03 11:18:25.289 15393 15393 E AndroidRuntime: at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3642)
08-03 11:18:25.289 15393 15393 E AndroidRuntime: at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:3695)
08-03 11:18:25.289 15393 15393 E AndroidRuntime: at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:3661)
08-03 11:18:25.289 15393 15393 E AndroidRuntime: at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:3669)
08-03 11:18:25.289 15393 15393 E AndroidRuntime: at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:3642)
08-03 11:18:25.289 15393 15393 E AndroidRuntime: at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:5922)
08-03 11:18:25.289 15393 15393 E AndroidRuntime: at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:5896)
08-03 11:18:25.289 15393 15393 E AndroidRuntime: at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:5857)
08-03 11:18:25.289 15393 15393 E AndroidRuntime: at android.view.ViewRootImpl$WindowInpu

问题是,为了找到崩溃的根本原因,我的代码中需要一个行号,但崩溃日志只记录在 Google 代码中。

我试图用谷歌搜索这种方法的崩溃:

Attempt to invoke virtual method 'void iqe.a(boolean)' on a null object reference



但是,这种崩溃有时会发生在方法 isu.a(boolean) 中。而不是 iqe.a(boolean) .

Google 和 StackOverflow 没有关于此崩溃或方法的任何内容/信息。

我试图在我的整个项目中搜索这种方法,但这并没有产生任何结果。

由于崩溃日志没有来自我的项目的任何行,我觉得很难分析是什么问题。

发生崩溃时:
  • 播放视频,新 Activity 打开。 > 按返回按钮。
  • 重复步骤 1 10-20 次。
  • 最佳答案

    在 backpress 方法中使用 Intent

    Intent intent=new Intent(Playlist.this,MainActivity.class);
    startActivity(intent);
    finish();

    关于java - 在 Youtube Player API 中出现大量崩溃,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/45857554/

    25 4 0
    Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
    广告合作:1813099741@qq.com 6ren.com