我在 google play 上有一个应用程序,其中包含 flurry 诊断程序。在 Flurry 网站上,它报告了 NullPointerException
,但我正在努力弄清楚它发生在哪一段代码中。
该程序受 proguard 保护,但 flurry 有一个系统,您可以上传 proguard 的 mapping.txt 并进行翻译。
生成的“堆栈跟踪”如下所示。我很困惑它说与 set_up_text_trace_for_quiz
相关的“未知来源”,以及下面的五种方法列表。哪里发生了空指针异常?为什么 add_game_play_buttons
旁边有 $2548a35
?
java.lang.NullPointerException
com.mycompany.mygame.DEF_GamePlay.set_up_text_trace_for_quiz(Unknown Source)
start_up_game_mode
distxyxy
do_move
add_game_play_buttons$2548a35
tpl
com.mycompany.mygame.DEF_GamePlay$MicksSurfaceViewExtension.onTouchEvent(Unknown Source)
android.view.View.dispatchTouchEvent(View.java:7340)
android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2185)
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1928)
android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2185)
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1928)
android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2185)
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1928)
android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:2185)
android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:1928)
com.android.internal.policy.impl.PhoneWindow$DecorView.superDispatchTouchEvent(PhoneWindow.java:2113)
com.android.internal.policy.impl.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1466)
android.app.Activity.dispatchTouchEvent(Activity.java:2468)
com.android.internal.policy.impl.PhoneWindow$DecorView.dispatchTouchEvent(PhoneWindow.java:2061)
android.view.View.dispatchPointerEvent(View.java:7525)
android.view.ViewRootImpl.deliverPointerEvent(ViewRootImpl.java:3368)
android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:3300)
android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:4392)
android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:4370)
android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:4474)
android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:171)
android.view.InputEventReceiver.nativeConsumeBatchedInputEvents(Native Method)
android.view.InputEventReceiver.consumeBatchedInputEvents(InputEventReceiver.java:163)
android.view.ViewRootImpl.doConsumeBatchedInput(ViewRootImpl.java:4442)
android.view.ViewRootImpl$ConsumeBatchedInputRunnable.run(ViewRootImpl.java:4493)
android.view.Choreographer$CallbackRecord.run(Choreographer.java:725)
android.view.Choreographer.doCallbacks(Choreographer.java:555)
android.view.Choreographer.doFrame(Choreographer.java:523)
android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:711)
android.os.Handler.handleCallback(Handler.java:615)
android.os.Handler.dispatchMessage(Handler.java:92)
android.os.Looper.loop(Looper.java:137)
android.app.ActivityThread.main(ActivityThread.java:4895)
java.lang.reflect.Method.invokeNative(Native Method)
java.lang.reflect.Method.invoke(Method.java:511)
com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:994)
com.android.internal.os.ZygoteInit.main(ZygoteInit.java:761)
dalvik.system.NativeStart.main(Native Method)
最佳答案
查看输出,您的 ProGuard 配置文件可能缺少以下几行:
-renamesourcefileattribute SourceFile
-keepattributes SourceFile,LineNumberTable
请查看 another post here 了解更多详细信息。
关于android - 困惑阅读 Flurry 的堆栈跟踪,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/22639716/