Skip to content

Commit

Permalink
Fix Android crash in release build due to ProGuard
Browse files Browse the repository at this point in the history
ProGuard optimizes out methods it considers unused in release build, but methods only called from native code appear unused.

The ProGuard rule was broken from renaming the main activity and also did not consider the server service yet.
  • Loading branch information
Robyt3 committed Dec 19, 2024
1 parent 0662eb7 commit f3af041
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/android/files/proguard-rules.pro
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
# debugging stack traces.
-keepattributes SourceFile,LineNumberTable

-keepclassmembers, allowoptimization public class org.ddnet.client.NativeMain {
-keepclassmembers, allowoptimization public class org.ddnet.client.* {
*;
}

Expand Down

0 comments on commit f3af041

Please sign in to comment.