Skip to content

Commit

Permalink
Add JNI release mode warning
Browse files Browse the repository at this point in the history
  • Loading branch information
dangeross committed Jun 20, 2024
1 parent 1a172e8 commit f0e4d39
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/guide/android_troubleshooting.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ Starting with this 1.8.20 release, the Kotlin K2 compiler has a preview version

## JNA library

JNA relies on specific class and method names to load native libraries and access native code. If these names are obfuscated or removed, it can cause runtime errors and failures in native library loading.
JNA relies on specific class and method names to load native libraries and access native code. If these names are obfuscated or removed, it can cause runtime errors and failures in native library loading.

The JNA library code obfuscation issue may not be apparent until an application is compiled on "release" mode with maximum optimization and minimal footprint size that'll be used when deploying & publishing an application.

To ensure proper functionality, a Proguard rules needs to be added to explicitly tell R8 compiler to keep certain parts of the JNA library. Here is an example of Proguard rules:
```pro
Expand Down

0 comments on commit f0e4d39

Please sign in to comment.