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

Bad JNI version returned from JNI_OnLoad on Android #54

Closed
Tracked by #60
SaeedRe opened this issue Aug 12, 2024 · 10 comments
Closed
Tracked by #60

Bad JNI version returned from JNI_OnLoad on Android #54

SaeedRe opened this issue Aug 12, 2024 · 10 comments
Assignees

Comments

@SaeedRe
Copy link

SaeedRe commented Aug 12, 2024

We are writing sample android application that uses the ngrok-java sdk.
We wrote this build.gradle.kts:

plugins {
    alias(libs.plugins.android.application)
    alias(libs.plugins.kotlin.android)
}

android {
    namespace = "org.example.aoc"
    compileSdk = 34

    defaultConfig {
        applicationId = "org.example.aoc"
        minSdk = 24
        targetSdk = 34
        versionCode = 1
        versionName = "1.0"
    }
    packaging {
        resources {
            excludes += "/META-INF/{AL2.0,LGPL2.1}"
        }
    }
    buildTypes {
        getByName("release") {
            isMinifyEnabled = false
        }
    }
    compileOptions {
        sourceCompatibility = JavaVersion.VERSION_11
        targetCompatibility = JavaVersion.VERSION_11
    }
    buildFeatures {
        compose = true
    }
    


}
val ngrokVersion = "1.1.0"
dependencies {
        implementation("com.ngrok:ngrok-java:${ngrokVersion}")
        implementation("com.ngrok:ngrok-java-native:$ngrokVersion:linux-android-aarch_64")
}

When we run the application, it crashes with the following stacktrace:

No implementation found for com.ngrok.NativeSession com.ngrok.NativeSession.connectNative(com.ngrok.Session$Builder) (tried Java_com_ngrok_NativeSession_connectNative and Java_com_ngrok_NativeSession_connectNative__Lcom_ngrok_Session_00024Builder_2)
2024-08-12 18:09:45.689 24653-24653 AndroidRuntime          org.example.aoc                     E  FATAL EXCEPTION: main (Ask Gemini)
Process: org.example.aoc, PID: 24653
java.lang.RuntimeException: java.lang.UnsatisfiedLinkError: No implementation found for com.ngrok.NativeSession com.ngrok.NativeSession.connectNative(com.ngrok.Session$Builder) (tried Java_com_ngrok_NativeSession_connectNative and Java_com_ngrok_NativeSession_connectNative__Lcom_ngrok_Session_00024Builder_2)
at com.ngrok.Session.connect(Session.java:53)
at com.ngrok.Session$Builder.connect(Session.java:542)
at org.example.aoc.AndroidNgrok.start(AndroidNgrok.kt:61)
at org.example.aoc.ComposableSingletons$AppKt$lambda-4$1.invoke$lambda$3$lambda$0(App.kt:22)
at org.example.aoc.ComposableSingletons$AppKt$lambda-4$1.$r8$lambda$0A0UfmP0CIuW1zBStYtzUft0cks(Unknown Source:0)
at org.example.aoc.ComposableSingletons$AppKt$lambda-4$1$$ExternalSyntheticLambda0.invoke(Unknown Source:4)
at androidx.compose.foundation.ClickablePointerInputNode$pointerInput$3.invoke-k-4lQ0M(Clickable.kt:987)
at androidx.compose.foundation.ClickablePointerInputNode$pointerInput$3.invoke(Clickable.kt:981)
at androidx.compose.foundation.gestures.TapGestureDetectorKt$detectTapAndPress$2$1.invokeSuspend(TapGestureDetector.kt:255)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTaskKt.resume(DispatchedTask.kt:175)
at kotlinx.coroutines.DispatchedTaskKt.dispatch(DispatchedTask.kt:164)
at kotlinx.coroutines.CancellableContinuationImpl.dispatchResume(CancellableContinuationImpl.kt:466)
at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl(CancellableContinuationImpl.kt:500)
at kotlinx.coroutines.CancellableContinuationImpl.resumeImpl$default(CancellableContinuationImpl.kt:489)
at kotlinx.coroutines.CancellableContinuationImpl.resumeWith(CancellableContinuationImpl.kt:364)
at androidx.compose.ui.input.pointer.SuspendingPointerInputModifierNodeImpl$PointerEventHandlerCoroutine.offerPointerEvent(SuspendingPointerInputFilter.kt:665)
at androidx.compose.ui.input.pointer.SuspendingPointerInputModifierNodeImpl.dispatchPointerEvent(SuspendingPointerInputFilter.kt:544)
at androidx.compose.ui.input.pointer.SuspendingPointerInputModifierNodeImpl.onPointerEvent-H0pRuoY(SuspendingPointerInputFilter.kt:566)
at androidx.compose.foundation.AbstractClickablePointerInputNode.onPointerEvent-H0pRuoY(Clickable.kt:947)
at androidx.compose.foundation.AbstractClickableNode.onPointerEvent-H0pRuoY(Clickable.kt:795)
at androidx.compose.ui.input.pointer.Node.dispatchMainEventPass(HitPathTracker.kt:317)
at androidx.compose.ui.input.pointer.Node.dispatchMainEventPass(HitPathTracker.kt:303)
at androidx.compose.ui.input.pointer.NodeParent.dispatchMainEventPass(HitPathTracker.kt:185)
at androidx.compose.ui.input.pointer.HitPathTracker.dispatchChanges(HitPathTracker.kt:104)
at androidx.compose.ui.input.pointer.PointerInputEventProcessor.process-BIzXfog(PointerInputEventProcessor.kt:113)
at androidx.compose.ui.platform.AndroidComposeView.sendMotionEvent-8iAsVTc(AndroidComposeView.android.kt:1576)
at androidx.compose.ui.platform.AndroidComposeView.handleMotionEvent-8iAsVTc(AndroidComposeView.android.kt:1527)
at androidx.compose.ui.platform.AndroidComposeView.dispatchTouchEvent(AndroidComposeView.android.kt:1466)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3121)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2802)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3121)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2802)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3121)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2802)
at android.view.ViewGroup.dispatchTransformedTouchEvent(ViewGroup.java:3121)
at android.view.ViewGroup.dispatchTouchEvent(ViewGroup.java:2802)
at com.android.internal.policy.DecorView.superDispatchTouchEvent(DecorView.java:498)
2024-08-12 18:09:45.697 24653-24653 AndroidRuntime          org.example.aoc                     E  	at com.android.internal.policy.PhoneWindow.superDispatchTouchEvent(PhoneWindow.java:1899) (Ask Gemini)
at android.app.Activity.dispatchTouchEvent(Activity.java:4262)
at com.android.internal.policy.DecorView.dispatchTouchEvent(DecorView.java:456)
at android.view.View.dispatchPointerEvent(View.java:15263)
at android.view.ViewRootImpl$ViewPostImeInputStage.processPointerEvent(ViewRootImpl.java:6548)
at android.view.ViewRootImpl$ViewPostImeInputStage.onProcess(ViewRootImpl.java:6348)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:5804)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:5861)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:5827)
at android.view.ViewRootImpl$AsyncInputStage.forward(ViewRootImpl.java:5992)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:5835)
at android.view.ViewRootImpl$AsyncInputStage.apply(ViewRootImpl.java:6049)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:5808)
at android.view.ViewRootImpl$InputStage.onDeliverToNext(ViewRootImpl.java:5861)
at android.view.ViewRootImpl$InputStage.forward(ViewRootImpl.java:5827)
at android.view.ViewRootImpl$InputStage.apply(ViewRootImpl.java:5835)
at android.view.ViewRootImpl$InputStage.deliver(ViewRootImpl.java:5808)
at android.view.ViewRootImpl.deliverInputEvent(ViewRootImpl.java:8857)
at android.view.ViewRootImpl.doProcessInputEvents(ViewRootImpl.java:8808)
at android.view.ViewRootImpl.enqueueInputEvent(ViewRootImpl.java:8777)
at android.view.ViewRootImpl$WindowInputEventReceiver.onInputEvent(ViewRootImpl.java:8980)
at android.view.InputEventReceiver.dispatchInputEvent(InputEventReceiver.java:267)
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:335)
at android.os.Looper.loopOnce(Looper.java:161)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7898)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)
Suppressed: kotlinx.coroutines.internal.DiagnosticCoroutineContextException: [androidx.compose.ui.platform.MotionDurationScaleImpl@307fd71, androidx.compose.runtime.BroadcastFrameClock@58756, StandaloneCoroutine{Cancelling}@41b03d7, AndroidUiDispatcher@9f654c4]
Caused by: java.lang.UnsatisfiedLinkError: No implementation found for com.ngrok.NativeSession com.ngrok.NativeSession.connectNative(com.ngrok.Session$Builder) (tried Java_com_ngrok_NativeSession_connectNative and Java_com_ngrok_NativeSession_connectNative__Lcom_ngrok_Session_00024Builder_2)
at com.ngrok.NativeSession.connectNative(Native Method)
at com.ngrok.NativeSession.connect(NativeSession.java:45)
at java.lang.reflect.Method.invoke(Native Method)
at com.ngrok.Session.connect(Session.java:47)
... 67 more

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):

System.loadLibrary("ngrok_java")

After this, when we run the application we get the following error:

java.lang.UnsatisfiedLinkError: Bad JNI version returned from JNI_OnLoad in "/data/app/~~ymvCDlJkZUFYRKr4zK8sVA==/org.example.aoc-Zw4AZ3HIsPDyBRjKbwPvFQ==/base.apk!/lib/arm64-v8a/libngrok_java.so": 65544
at java.lang.Runtime.loadLibrary0(Runtime.java:1077)
at java.lang.Runtime.loadLibrary0(Runtime.java:998)
at java.lang.System.loadLibrary(System.java:1661)
at org.example.aoc.AndroidNgrok.<init>(AndroidNgrok.kt:22)
at org.example.aoc.ComposableSingletons$AppKt$lambda-4$1.invoke(App.kt:17)
at org.example.aoc.ComposableSingletons$AppKt$lambda-4$1.invoke(App.kt:16)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:109)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
at androidx.compose.material.MaterialTheme_androidKt.PlatformMaterialTheme(MaterialTheme.android.kt:23)
at androidx.compose.material.MaterialThemeKt$MaterialTheme$1$1.invoke(MaterialTheme.kt:82)
at androidx.compose.material.MaterialThemeKt$MaterialTheme$1$1.invoke(MaterialTheme.kt:81)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:109)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:248)
at androidx.compose.material.TextKt.ProvideTextStyle(Text.kt:396)
at androidx.compose.material.MaterialThemeKt$MaterialTheme$1.invoke(MaterialTheme.kt:81)
at androidx.compose.material.MaterialThemeKt$MaterialTheme$1.invoke(MaterialTheme.kt:80)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:109)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:228)
at androidx.compose.material.MaterialThemeKt.MaterialTheme(MaterialTheme.kt:72)
at org.example.aoc.AppKt.App(App.kt:16)
at org.example.aoc.ComposableSingletons$MainActivityKt$lambda-1$1.invoke(MainActivity.kt:14)
at org.example.aoc.ComposableSingletons$MainActivityKt$lambda-1$1.invoke(MainActivity.kt:13)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:109)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
at androidx.compose.ui.platform.ComposeView.Content(ComposeView.android.kt:428)
at androidx.compose.ui.platform.AbstractComposeView$ensureCompositionCreated$1.invoke(ComposeView.android.kt:252)
at androidx.compose.ui.platform.AbstractComposeView$ensureCompositionCreated$1.invoke(ComposeView.android.kt:251)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:109)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:228)
at androidx.compose.ui.platform.CompositionLocalsKt.ProvideCommonCompositionLocals(CompositionLocals.kt:186)
at androidx.compose.ui.platform.AndroidCompositionLocals_androidKt$ProvideAndroidCompositionLocals$3.invoke(AndroidCompositionLocals.android.kt:119)
at androidx.compose.ui.platform.AndroidCompositionLocals_androidKt$ProvideAndroidCompositionLocals$3.invoke(AndroidCompositionLocals.android.kt:118)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:109)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:228)
at androidx.compose.ui.platform.AndroidCompositionLocals_androidKt.ProvideAndroidCompositionLocals(AndroidCompositionLocals.android.kt:110)
at androidx.compose.ui.platform.WrappedComposition$setContent$1$1$2.invoke(Wrapper.android.kt:139)
2024-08-12 14:14:54.819  6779-6779  AndroidRuntime          org.example.aoc                     E  	at androidx.compose.ui.platform.WrappedComposition$setContent$1$1$2.invoke(Wrapper.android.kt:138) (Ask Gemini)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:109)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
at androidx.compose.runtime.CompositionLocalKt.CompositionLocalProvider(CompositionLocal.kt:248)
at androidx.compose.ui.platform.WrappedComposition$setContent$1$1.invoke(Wrapper.android.kt:138)
at androidx.compose.ui.platform.WrappedComposition$setContent$1$1.invoke(Wrapper.android.kt:123)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:109)
at androidx.compose.runtime.internal.ComposableLambdaImpl.invoke(ComposableLambda.jvm.kt:35)
at androidx.compose.runtime.ActualJvm_jvmKt.invokeComposable(ActualJvm.jvm.kt:90)
at androidx.compose.runtime.ComposerImpl.doCompose(Composer.kt:3302)
at androidx.compose.runtime.ComposerImpl.composeContent$runtime_release(Composer.kt:3235)
at androidx.compose.runtime.CompositionImpl.composeContent(Composition.kt:725)
at androidx.compose.runtime.Recomposer.composeInitial$runtime_release(Recomposer.kt:1071)
at androidx.compose.runtime.CompositionImpl.composeInitial(Composition.kt:633)
at androidx.compose.runtime.CompositionImpl.setContent(Composition.kt:619)
at androidx.compose.ui.platform.WrappedComposition$setContent$1.invoke(Wrapper.android.kt:123)
at androidx.compose.ui.platform.WrappedComposition$setContent$1.invoke(Wrapper.android.kt:114)
at androidx.compose.ui.platform.AndroidComposeView.setOnViewTreeOwnersAvailable(AndroidComposeView.android.kt:1289)
at androidx.compose.ui.platform.WrappedComposition.setContent(Wrapper.android.kt:114)
at androidx.compose.ui.platform.WrappedComposition.onStateChanged(Wrapper.android.kt:164)
at androidx.lifecycle.LifecycleRegistry$ObserverWithState.dispatchEvent(LifecycleRegistry.jvm.kt:320)
at androidx.lifecycle.LifecycleRegistry.addObserver(LifecycleRegistry.jvm.kt:198)
at androidx.compose.ui.platform.WrappedComposition$setContent$1.invoke(Wrapper.android.kt:121)
at androidx.compose.ui.platform.WrappedComposition$setContent$1.invoke(Wrapper.android.kt:114)
at androidx.compose.ui.platform.AndroidComposeView.onAttachedToWindow(AndroidComposeView.android.kt:1364)
at android.view.View.dispatchAttachedToWindow(View.java:21291)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3491)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3498)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3498)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3498)
at android.view.ViewGroup.dispatchAttachedToWindow(ViewGroup.java:3498)
at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:2771)
at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:2286)
at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:8948)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1231)
at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1239)
at android.view.Choreographer.doCallbacks(Choreographer.java:899)
at android.view.Choreographer.doFrame(Choreographer.java:832)
at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1214)
at android.os.Handler.handleCallback(Handler.java:942)
at android.os.Handler.dispatchMessage(Handler.java:99)
at android.os.Looper.loopOnce(Looper.java:201)
at android.os.Looper.loop(Looper.java:288)
at android.app.ActivityThread.main(ActivityThread.java:7898)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:936)

Would you provide a sample android application?

@diegorondini
Copy link

@nikolay-ngrok can you help here?

@jrobsonchase jrobsonchase self-assigned this Aug 14, 2024
@jrobsonchase
Copy link
Contributor

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?

@jrobsonchase
Copy link
Contributor

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 UnsatisfiedLinkError you were seeing. I'll keep digging!

@jrobsonchase
Copy link
Contributor

Very confused. Is the android classloader filtering things from the jar?

The attempt to load the native library fails because the call to Runtime.class.getResourceAsStream("/libngrok_java.so") returns null, even though the call to NativeSession.class.getResourceAsStream("/native.properties") is just fine.

They're both at the root of the jar:

$ jar tf Downloads/ngrok-java-native-1.1.0-linux-android-aarch_64.jar | grep -E '(native.properties|libngrok_java.so)'
native.properties
libngrok_java.so

Yet:

var r1 = NativeSession::class.java.getResource("/native.properties");
var r2 = NativeSession::class.java.getResource("/libngrok_java.so");

image

@jrobsonchase
Copy link
Contributor

jrobsonchase commented Aug 15, 2024

Finally figured out how to get the .so to actually get included in the apk and am now at that "Bad JNI version returned from JNI_OnLoad" error. I believe the problem is that we don't even define that function, which isn't usually a problem, but maybe Android is just weird?

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? 🙃

@jrobsonchase jrobsonchase changed the title Runtime loading issue when using ngrok-java in Android Bad JNI version returned from JNI_OnLoad on Android Aug 15, 2024
@jrobsonchase
Copy link
Contributor

Since there are two separate issues at play here, I'm turning this one into the OnLoad problem and #50 into the null getResourceAsStream problem. Pretty sure they're entirely independent of one another.

@diegorondini
Copy link

Hi @jrobsonchase

thank you for having a look at this.
I concur there are two separate issues; that's why we opened this one about the OnLoad problem.

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 .so file is that it's missing the SONAME, which is required in Android binaries (https://android-developers.googleblog.com/2016/06/android-changes-for-ndk-developers.html):

$ $ANDROID_HOME/ndk/22.0.7026061/toolchains/llvm/prebuilt/linux-x86_64/aarch64-linux-android/bin/readelf --dynamic libngrok_java.so 

Dynamic section at offset 0x58d548 contains 24 entries:
  Tag        Type                         Name/Value
 0x0000000000000001 (NEEDED)             Shared library: [libdl.so]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so]
 0x000000000000001e (FLAGS)              BIND_NOW
 0x000000006ffffffb (FLAGS_1)            Flags: NOW
 0x0000000000000007 (RELA)               0x1d28
 0x0000000000000008 (RELASZ)             333816 (bytes)
 0x0000000000000009 (RELAENT)            24 (bytes)
 0x000000006ffffff9 (RELACOUNT)          13907
 0x0000000000000017 (JMPREL)             0x53520
 0x0000000000000002 (PLTRELSZ)           1920 (bytes)
 0x0000000000000003 (PLTGOT)             0x58fbb0
 0x0000000000000014 (PLTREL)             RELA
 0x0000000000000006 (SYMTAB)             0x308
 0x000000000000000b (SYMENT)             24 (bytes)
 0x0000000000000005 (STRTAB)             0x1404
 0x000000000000000a (STRSZ)              2333 (bytes)
 0x000000006ffffef5 (GNU_HASH)           0xf48
 0x0000000000000004 (HASH)               0x104c
 0x000000000000001a (FINI_ARRAY)         0x58f538
 0x000000000000001c (FINI_ARRAYSZ)       16 (bytes)
 0x000000006ffffff0 (VERSYM)             0xe18
 0x000000006ffffffe (VERNEED)            0xf04
 0x000000006fffffff (VERNEEDNUM)         2
 0x0000000000000000 (NULL)               0x0

Regards

@jrobsonchase
Copy link
Contributor

This issue is technically fixed in main. If you grab the .so from this release and copy it to your jni libs directory, it should now load cleanly.

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!

@SaeedRe
Copy link
Author

SaeedRe commented Aug 26, 2024

This issue is technically fixed in main. If you grab the .so from this release and copy it to your jni libs directory, it should now load cleanly.

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
With the new .so lib, I also get the same error java.lang.UnsatisfiedLinkError: Bad JNI version returned from JNI_OnLoad again.

If you have any example android project that is working for you, I would appreciate it if you can share it with me.
And also, in which device configuration did you test it?

@nicolalagloria
Copy link

@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?

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

4 participants