我在Google Play商店中收到了以下崩溃报告:
java.lang.NullPointerException:
at com.xxx.MainActivity.access$1000 (MainActivity.java)
or .access$900 (MainActivity.java)
or .doStamping (MainActivity.java)
or .handleIntent (MainActivity.java)
or .putLabelOnStableStoppedButton (MainActivity.java)
or .wrongFilePopup (MainActivity.java)
at com.xxx.MainActivity.access$1502 (MainActivity.java)
or .access$1700 (MainActivity.java)
or .access$200 (MainActivity.java)
or .access$2000 (MainActivity.java)
or .access$800 (MainActivity.java)
or .createDateDetailsSummaryText (MainActivity.java)
or .refreshLabelOnStampButton (MainActivity.java)
or .stampGPSEvent (MainActivity.java)
or .startGPSLogging (MainActivity.java)
at com.xxx.MainActivity.access$100 (MainActivity.java)
or .access$1402 (MainActivity.java)
or .access$1602 (MainActivity.java)
or .access$1900 (MainActivity.java)
or .access$2400 (MainActivity.java)
or .access$400 (MainActivity.java)
or .access$500 (MainActivity.java)
or .access$602 (MainActivity.java)
or .access$702 (MainActivity.java)
or .btAutoStamping (MainActivity.java)
or .createHtmlTextForButton (MainActivity.java)
or .csvImportFinished (MainActivity.java)
or .displayGetProPopup (MainActivity.java)
or .getValuesAndSaveDialog (MainActivity.java)
or .intentDisplayMap (MainActivity.java)
or .parseIntFromPrefs (MainActivity.java)
or .pickedFileOK (MainActivity.java)
or .showCurrentTripPopUp (MainActivity.java)
or .showStampLimitExceededPopup (MainActivity.java)
or .stopGPSLogging (MainActivity.java)
or .stopTickingBtStamp (MainActivity.java)
or .wrongFilePopup (MainActivity.java)
at com.xxx.MainActivity$21.onClick (MainActivity.java)
at android.support.v7.app.AlertController$ButtonHandler.handleMessage (AlertController.java)
at android.os.Handler.dispatchMessage (Handler.java:102)
at android.os.Looper.loop (Looper.java:154)
at android.app.ActivityThread.main (ActivityThread.java:6776)
at java.lang.reflect.Method.invoke (Method.java)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run (ZygoteInit.java:1496)
at com.android.internal.os.ZygoteInit.main (ZygoteInit.java:1386)
我有两个问题:
答案 0 :(得分:1)
1:Proguard经常会重复使用方法名称,这意味着当涉及去混淆时,地图无法区分,因此它必须向您展示所有可能性。 This question和This question可能会有所帮助。
2:access $是内部类或lambdas上的方法,它们访问父类。例如,如果你有这样的代码:
class Outer {
private boolean field = false;
class Inner {
void doSomething() {
if (field) {
System.out.println("hello world");
}
}
}
}
粗略地说,要做好这一行" if field"编译器需要从Inner访问Outer.field。但字节码没有内部类的概念。 因此,它创建了一个隐藏方法访问$ XXX()以访问Outer.field。如果您使用lambda expression,也会发生类似情况。