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

Note about JNI and Proguard #22

Open
netshade opened this issue Nov 6, 2024 · 0 comments
Open

Note about JNI and Proguard #22

netshade opened this issue Nov 6, 2024 · 0 comments

Comments

@netshade
Copy link

netshade commented Nov 6, 2024

Just a note for anyone else that may have encountered this: when running quickjs-android in a build that includes ProGuard, symbol information is discarded. This will cause the library to be unable to successfully complete JNI_OnLoad due to symbol lookups it performs.

In order to keep the symbol information so that JNI can initialize correctly, you will want to add the following rules to your proguard config:

-keep class com.hippo.quickjs.** { *; }

This will keep all symbol information in the library - you could be more selective here, but I opted to allow for everything to be retained in case there were any dependencies I wasn't aware of.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant