I updated to the latest version of Android Studio and its ProGuard/R8 tool (compiler version 8.7.18). The mapping.txt file is still created when I create an apk file, but it does not contain the original methode name any more, it looks like this:
1:5:void a(int):11:11 -> x0
The method name on the left is also obfuscated.
Before the update it looks like this:
1:4:void addSymbol(int):171:171 -> h
When I upload it to the developer console, it is not able to deobfuscate the stack traces when an exception occurs.
My file proguard-rules.pro looks like this:
-keepattributes SourceFile,LineNumberTable
-renamesourcefileattribute SourceFile
Do you have and idea how to see the original method names, again?
I was able to solve it! I add my solution here just in case that someone else runs into the same trouble. Maybe it could help sgjesse to find out more details?
The project handheld uses the project app to build the handheld apk file.
Original content of app\proguard-rules.pro:
-keepattributes SourceFile,LineNumberTable
-renamesourcefileattribute SourceFile
Original content of handheld\proguard-rules.pro:
-keepattributes SourceFile,LineNumberTable
-renamesourcefileattribute SourceFile
Updated content of app\proguard-rules.pro:
-keepattributes SourceFile,LineNumberTable
-renamesourcefileattribute SourceFile
-keep public class * extends androidx.appcompat.app.AppCompatActivity
-keep public class * extends android.inputmethodservice.InputMethodService
-keepclassmembers class * extends androidx.appcompat.widget.AppCompatImageView {
public <init>(android.content.Context, android.util.AttributeSet);
}
-keep class * extends androidx.appcompat.widget.AppCompatImageView
-keep class *
-keepclassmembers class * {
*;
}
Updated content of handheld\proguard-rules.pro:
This file does not contain any content at all now.
Now my methods in the mapping.txt file look like this again:
1:4:void addSymbol(int):171:171 -> h
With this setup I was afraid, that obfuscation would take place at all, but this is not the case.
I do not know why this works now, but I tested it several times and everything seems to be fine now.