我在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代码。
我试图在这种方法中谷歌崩溃:
尝试调用虚方法' void iqe.a(boolean)'在null 对象参考
但是,有时使用方法isu.a(boolean)
而非iqe.a(boolean)
发生此崩溃。
Google和StackOverflow没有关于此崩溃或方法的任何内容/信息。
我试图在整个项目中搜索此方法,但这不会产生任何结果。
由于崩溃日志中没有来自我项目的任何行,我觉得分析问题非常困难。
发生崩溃时
答案 0 :(得分:-2)
在背景方法中使用意图
Intent intent=new Intent(Playlist.this,MainActivity.class);
startActivity(intent);
finish();