سؤال

Got a Play Store crash report (hooray). The stack trace lists an NPE occurring in MyActivity#d(), inside of MyAtivity#onCreate(). Is this a compiler-generated method? I sure didn't write it!

Caused by: java.lang.NullPointerException
at com.example.MyActivity.d(Unknown Source)
at com.example.MyActivity.onCreate(Unknown Source)
at android.app.Activity.performCreate(Activity.java:5008)
at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1079)
at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2023)

Thanks in advance!

هل كانت مفيدة؟

المحلول

You probably did run pro guard (the Google obfuscation) when you made the build. Look for a file called mapping.txt it will give you the real name of the d() method.

mapping.txt: Lists the mapping between the original and obfuscated class, method, and field names. This file is important when you receive a bug report from a release build, because it translates the obfuscated stack trace back to the original class, method, and member names.

Look here for more.

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top