Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Troubleshooting Android section #172

Merged
merged 4 commits into from
Jun 20, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Copy link
Contributor

@erdemyerebasmaz erdemyerebasmaz Jun 20, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JNA library code obfuscation issue may not be apparent until users compile their apps on "release" mode with maximum optimization and minimal footprint size that'll be used when deploying & publishing their app.

I think we should add a warning about this in this section.


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 compiled on "release" mode with maximum optimization and minimal footprint size that'll be used when deploying and publishing an application.
erdemyerebasmaz marked this conversation as resolved.
Show resolved Hide resolved
dangeross marked this conversation as resolved.
Show resolved Hide resolved

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
Loading