-
Notifications
You must be signed in to change notification settings - Fork 36
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
HEELP #131
Comments
i get this error on android |
i use jni onload and attach thread but if i try create instance i get this error |
Something seems to be wrong with your classpath. It seems the How do you setup your Android app? Is it a Java application that calls Rust native code? There should not be any classloading issues if:
|
not works |
i attach tread, add this to dependencies, load libary and only crashes |
|
|
|
I have just tested the example using the latest When do you call the j4rs::set_java_vm |
I call it from static in class, its needed for egui, set java vm i call too |
Do you maybe have some code to share? |
Go to pumpkin egui |
I am having difficulties to understand the setup of the project. I see that you define a MainActivity in your How do you build your project, create the EDIT: One more question: Have you verified that |
Cargo ndk then gradle build |
Cargo ndk then gradle build |
And i want help: what the bestethod: construct main activity for call method or inline method? |
Like call all method code in rust |
See makefile |
Using some logging I guess
As you see in the example project mentioned above, currently, the supported way is to implement the main activity in Java, use JNI_OnLoad and call the native method from Java to Rust. I am also investigating "rust-only" ways, using |
Yeah its setted |
I dont know what its wrong |
But gradle build works |
Any updates? |
Helo? |
How does the app load the activity? Is the native activity used, or the activity you implemented? You can open the apk and inspect:
|
Implemented the ability to use let jvm = JvmBuilder::new()
.with_java_vm(java_vm.clone())
.with_classloader_of_activity_(activity_obj.clone())
.build()?; |
For more details, please see this example project. |
10-31 19:45:41.736 10253 10253 F DEBUG : Abort message: 'JNI DETECTED ERROR IN APPLICATION: JNI NewGlobalRef called with pending exception java.lang.ClassNotFoundException: Didn't find class "org.astonbitecode.j4rs.api.dtos.InvocationArg"
The text was updated successfully, but these errors were encountered: