-
Notifications
You must be signed in to change notification settings - Fork 26
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
JNI can't find some Kotlin functions for SDK 24-26 #531
Comments
Hm, I wouldn't understand why this suddenly fails. You can call private methods through JNI, that shouldn't make a difference at all. Lines 246 to 251 in 4907639
That's private and can be called from C++/JNI just fine. |
Ah - so it works on minSdk 26+... That is even more weird, lol. |
@jpudysz can you add |
Potential fix: #534 |
And the last thing you can try is to add a Appreciate your help here |
I just merged this - but pls still try if |
same for |
Ah, shit. |
I would need to reproduce this here in the example app, can I just set minSdk to 24 and it will be reproduceable? |
You can repro it with my example on |
What's happening?
Hey,
for older Android SDKs 24-26 JNI struggles to get class method. It throws error that there is no such method, which is obviously not true. It works fine for SDK greater than 26+.
I was able to reproduce it locally, but can't with Nitro example.
I use C++ bindings to store C++ lambda on Kotlin side. I'm using it for sync callbacks.
Removing
private
fromregisterPlatformListener_cxx
fixes the issue.Reproduceable Code
Relevant log output
Device
Android Emulator with SDK 24-26
Nitro Modules Version
0.22.1
Nitrogen Version
0.22.1
Can you reproduce this issue in the Nitro Example app here?
No, I cannot reproduce the issue in the Example app
Additional information
The text was updated successfully, but these errors were encountered: