I have an Android app written in Oxygene and published on the Google Play Store. My app crash report Stack Traces in the Google Play Console seem to indicate that the code has been obfuscated.
The stack traces look like this, for example:
java.lang.NullPointerException:
at MyFileName.SomeObject.MethodName (Unknown Source: 56)
at MyFileName.AnotherObject.NewMethodName (Unknown Source: 27)
Instead of this:
java.lang.NullPointerException:
at MyFileName.SomeObject.MethodName (MyFileName: 9231)
at MyFileName.AnotherObject.NewMethodName (MyFileName: 3672)
In a typical Android project run via Android Studio and the standard toolchain, this is caused by ProGuard and can be fixed with the correct ProGuard settings or by uploading the mapping.txt file to the Play Console to deobfuscate (all described here).
Is EBuild obfuscating code in the build process? If so, is there a mapping.txt produced similarly to ProGuard?
This only seems to be an issue with the standard toolchain when obfuscation is enabled, so I was guessing that it may be the same cause in the EBuild toolchain. Is there any way in EBuild to see the actual error cause and line numbers in release builds?
obfuscation changes your actual method names. debug symbols associate your method names/binary code locations with source locations. thereās an option to generate or not generate debug symbols (itās on for Debug, off for Release, by default).
I just ran across an issue with this. The Android manifest has a comment noting that the android:debuggable="true" attribute is overwritten by the compiler when the debug info option is set. The problem is that Iām wanting my Release builds to generate debug symbols but not be debuggable.
Would it be possible to have android:debuggable="true" overridden if the build is set to Debug (not Release) rather than if the debug symbols are set to On?
When an app in production crashes, I get the crash report with stack trace in the Google Play Developer Console. When debug symbols are turned off, the stack trace does not show the Exceptionās message or the line numbers. Having this information available makes bug fixes significantly faster. For security reasons, the Google Play Store does not allow production apps to be marked debuggable (and I would not want production apps to be debuggable).
So I want my production apps to be NOT debuggable but to still show debug symbols in the crash reports. I donāt know how it works ābehind the scenesā but it doesnāt seem like these should be mutually exclusive since Android apps built in Android Studio show the debug symbols in their crash reports.
Ok, next build has a new AndroidAllowDebugging setting that drives the debuggable tag in the Manifest. If not set, I will default to the value of GenerateDebugSymbols and thus match the current behavior. But you can explicitly set it to ātrueā to allow debugging w.o symbols, or to āfalseā to disable debugging even though you ship symbols.
If this all works out well for you, next week Iāll change the default template to have debug symbols true, debugging false set for Release, and both to true for Debug config.