所以 Fabric 并没有完全去混淆任何堆栈跟踪......它确实部分地这样做了,我注意到它在堆栈跟踪中附加了一些随机的未知方法,这些方法与上下文中的代码无关。
Fatal Exception: java.lang.NullPointerException: Attempt to invoke interface method 'android.content.Context in.ulink.agrostar.agroex.b.a.j.e()' on a null object reference
at in.ulink.agrostar.agroex.presenter.HomePresenter.fetchLeadsFromApi(method 'onItemClicked':344)
at in.ulink.agrostar.agroex.presenter.HomePresenter.syncOfflineLeadsAdded(method 'onItemClicked')
at in.ulink.agrostar.agroex.presenter.HomePresenter$3.onPostExecute(method 'onItemClicked':554)
at in.ulink.agrostar.agroex.presenter.HomePresenter$3.onPostExecute(method 'onItemClicked':540)
at android.os.AsyncTask.finish(AsyncTask.java:651)
at android.os.AsyncTask.access$500(AsyncTask.java:180)
at android.os.AsyncTask$InternalHandler.handleMessage(AsyncTask.java:668)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:148)
at android.app.ActivityThread.main(ActivityThread.java:5417)
at java.lang.reflect.Method.invoke(Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:726)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:616)
这就是我的 ProGuard 映射文件中的内容
#FOR CRASHLYTICS
-keepattributes *Annotation*
-keepattributes SourceFile,LineNumberTable
有人可以分享他们所做的事情,以便当我在没有 ProGuard 的调试模式下运行时,Crashlytics (Fabric) 提供准确的堆栈跟踪。