-
Notifications
You must be signed in to change notification settings - Fork 10
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
Bad JNI version returned from JNI_OnLoad on Android #54
Comments
@nikolay-ngrok can you help here? |
Nikolay's out for a bit, but I'll take a look in the meantime! I haven't done any android development before though. Is this something that I should be able to trigger by building/running a sample project in termux, or do I need to get a more complete android development environment and sample app set up? |
Oh cool, it was actually easier than I expected to get a "Hello, Android!" project building and running, and I managed to get the same |
Very confused. Is the android classloader filtering things from the jar? The attempt to load the native library fails because the call to They're both at the root of the jar:
Yet:
|
Finally figured out how to get the Edit: ugh, it's from the jaffi helper library which doesn't make it configurable. Oh well, we already depend on a fork of it, so what's one more change? 🙃 |
Since there are two separate issues at play here, I'm turning this one into the OnLoad problem and #50 into the |
thank you for having a look at this. I guess the issues stem from the fact you're using Rust for native code, hence you don't have first-class integration with the Android NDK (at least not yet). For example, an issue that can be seen in your
Regards |
This issue is technically fixed in That's not to say that it actually works on android yet 😭 I'm going to open a top-level issue for general android support and some more focused issues as I run across them. Thanks for your patience and the pointers! |
@jrobsonchase If you have any example android project that is working for you, I would appreciate it if you can share it with me. |
@jrobsonchase is there any update on this thread? We are getting the same error. Can you provide more details on how you made that work? |
We are writing sample android application that uses the ngrok-java sdk.
We wrote this build.gradle.kts:
When we run the application, it crashes with the following stacktrace:
We also tried an other workaround to load the .so binary manually by extracting it from the
ngrok-java-native-1.1.0-linux-android-aarch_64.jar
file and put it inside the following directory:src/main/jniLibs/arm64-v8a
And we load the library from our code using the following code (Right before using the ngrok-java sdk methods):
After this, when we run the application we get the following error:
Would you provide a sample android application?
The text was updated successfully, but these errors were encountered: