问题描述
我从应用程序的Google Play管理区域下载了崩溃报告,并通过retrace.sh
运行了该报告以对Proguard映射进行模糊处理,并在下面生成了输出.
I downloaded a crash report from my app's Google Play admin area, ran it through retrace.sh
to deobfuscate the Proguard mapping, and it produced the output below.
问题:
什么是未知来源?
showHeader
,showPhoto
等确实是我的SummaryFragment
类中的方法,但是为什么按所示顺序列出它们呢?这些方法在我的代码中不遵循任何逻辑或执行顺序.
showHeader
, showPhoto
, etc. are indeed methods in my SummaryFragment
class, but why are they listed in the order shown? These methods do not follow any sort of logical or execution order in my code.
NPE实际使用哪种方法?
In which method was the NPE actually thrown?
Caused by: java.lang.NullPointerException
at com.myapp.SummaryFragment.selectMenuItemAuth(Unknown Source)
showHeader
photoButtonClicked
showPhoto
nameButtonClicked
deleteByID
access$0
at com.myapp.SummaryFragment.onActivityCreated(Unknown Source)
at android.support.v4.app.Fragment.performActivityCreated(Unknown Source)
at android.support.v4.app.FragmentManagerImpl.moveToState(Unknown Source)
moveToState
moveToState
moveToState
推荐答案
ProGuard已从混淆后的应用程序中删除了可选属性SourceFile和LineNumberTable.结果,堆栈跟踪没有行号,从而造成了一些歧义. ReTrace会为堆栈跟踪的每一行打印出可能的替代项列表.
ProGuard has removed the optional attributes SourceFile and LineNumberTable from the obfuscated application. As a result, the stack traces don't have line numbers, causing some ambiguity. ReTrace prints out a list of possible alternatives for each line of the stack trace.
通过在proguard-project.txt
中添加以下行,可以获得更易于解释的堆栈跟踪:
You can get stack traces that are easier to interpret by adding the following lines to your proguard-project.txt
:
-renamesourcefileattribute MyApplication
-keepattributes SourceFile,LineNumberTable
请参阅ProGuard手册> ReTrace> 用法.
See the ProGuard manual > ReTrace > Usage.
请参阅ProGuard手册>示例> 生成有用的堆栈跟踪
See the ProGuard manual > Examples > Producing useful stack traces
这篇关于您如何解读模糊的Android崩溃报告?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!