You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi there,
I wanted to try out this project but I'm faced with multiple errors
Here's my java_glue.rs.in file
usecrate::*;use jni_sys::*;foreign_class!(
class RustLog{fnRustLog::initialise_logging(); alias initialiseLogging;
});
lib.rs
mod java_glue;pubusecrate::java_glue::*;use android_logger::Config;use log::{Level,LevelFilter};pubstructRustLog;implRustLog{//set up loggingpubfninitialise_logging(){#[cfg(target_os = "android")]
android_logger::init_once(Config::default().with_max_level(LevelFilter::Trace).with_tag("Rust"),);
log_panics::init();
log::error!("Logging initialised from Rust");}}
error[E0609]: no field `DetachCurrentThread` on type `JNIInvokeInterface_`
--> /Users/kofiotuo/IdeaProjects/RustApplication/rust_lib/target/aarch64-linux-android/debug/build/rust_lib-5b22bb56ef553d34/out/java_glue.rs:132:43
|
132 | (**self.callback.java_vm).DetachCurrentThread.unwrap()(self.callback.java_vm)
| ^^^^^^^^^^^^^^^^^^^ unknown field
|
help: some of the expressions' fields have a field of the same name
|
132 | (**self.callback.java_vm).reserved.DetachCurrentThread.unwrap()(self.callback.java_vm)
| +++++++++
132 | (**self.callback.java_vm).v1_1.DetachCurrentThread.unwrap()(self.callback.java_vm)
| +++++
132 | (**self.callback.java_vm).v1_2.DetachCurrentThread.unwrap()(self.callback.java_vm)
| +++++
132 | (**self.callback.java_vm).v1_4.DetachCurrentThread.unwrap()(self.callback.java_vm)
| +++++
error[E0609]: no field `GetJavaVM` on type `JNINativeInterface_`
--> /Users/kofiotuo/IdeaProjects/RustApplication/rust_lib/target/aarch64-linux-android/debug/build/rust_lib-5b22bb56ef553d34/out/java_glue.rs:144:36
|
144 | let ret = unsafe { (**env).GetJavaVM.unwrap()(env, &mut java_vm) };
| ^^^^^^^^^ unknown field
|
= note: available fields are: `v1_1`, `v1_2`, `v1_4`, `v1_6`, `v9` ... and 2 others
error[E0609]: no field `NewGlobalRef` on type `JNINativeInterface_`
--> /Users/kofiotuo/IdeaProjects/RustApplication/rust_lib/target/aarch64-linux-android/debug/build/rust_lib-5b22bb56ef553d34/out/java_glue.rs:146:43
|
146 | let global_obj = unsafe { (**env).NewGlobalRef.unwrap()(env, obj) };
| ^^^^^^^^^^^^ unknown field
|
help: some of the expressions' fields have a field of the same name
|
146 | let global_obj = unsafe { (**env).reserved.NewGlobalRef.unwrap()(env, obj) };
| +++++++++
146 | let global_obj = unsafe { (**env).v19.NewGlobalRef.unwrap()(env, obj) };
| ++++
146 | let global_obj = unsafe { (**env).v1_1.NewGlobalRef.unwrap()(env, obj) };
| +++++
146 | let global_obj = unsafe { (**env).v1_2.NewGlobalRef.unwrap()(env, obj) };
| +++++
and 3 other candidates
error[E0609]: no field `GetEnv` on type `JNIInvokeInterface_`
--> /Users/kofiotuo/IdeaProjects/RustApplication/rust_lib/target/aarch64-linux-android/debug/build/rust_lib-5b22bb56ef553d34/out/java_glue.rs:158:30
|
158 | (**self.java_vm).GetEnv.unwrap()(
| ^^^^^^ unknown field
|
help: some of the expressions' fields have a field of the same name
|
158 | (**self.java_vm).reserved.GetEnv.unwrap()(
| +++++++++
158 | (**self.java_vm).v1_2.GetEnv.unwrap()(
| +++++
158 | (**self.java_vm).v1_4.GetEnv.unwrap()(
| +++++
error[E0609]: no field `AttachCurrentThread` on type `JNIInvokeInterface_`
--> /Users/kofiotuo/IdeaProjects/RustApplication/rust_lib/target/aarch64-linux-android/debug/build/rust_lib-5b22bb56ef553d34/out/java_glue.rs:188:30
|
188 | (**self.java_vm).AttachCurrentThread.unwrap()(
| ^^^^^^^^^^^^^^^^^^^ unknown field
|
help: some of the expressions' fields have a field of the same name
|
188 | (**self.java_vm).reserved.AttachCurrentThread.unwrap()(
| +++++++++
188 | (**self.java_vm).v1_1.AttachCurrentThread.unwrap()(
| +++++
188 | (**self.java_vm).v1_2.AttachCurrentThread.unwrap()(
| +++++
188 | (**self.java_vm).v1_4.AttachCurrentThread.unwrap()(
| +++++
error[E0609]: no field `DeleteGlobalRef` on type `JNINativeInterface_`
--> /Users/kofiotuo/IdeaProjects/RustApplication/rust_lib/target/aarch64-linux-android/debug/build/rust_lib-5b22bb56ef553d34/out/java_glue.rs:220:30
|
220 | unsafe { (**env).DeleteGlobalRef.unwrap()(env, self.this) };
| ^^^^^^^^^^^^^^^ unknown field
|
help: some of the expressions' fields have a field of the same name
|
220 | unsafe { (**env).reserved.DeleteGlobalRef.unwrap()(env, self.this) };
| +++++++++
220 | unsafe { (**env).v19.DeleteGlobalRef.unwrap()(env, self.this) };
| ++++
220 | unsafe { (**env).v1_1.DeleteGlobalRef.unwrap()(env, self.this) };
| +++++
220 | unsafe { (**env).v1_2.DeleteGlobalRef.unwrap()(env, self.this) };
| +++++
and 3 other candidates
error[E0609]: no field `ThrowNew` on type `JNINativeInterface_`
--> /Users/kofiotuo/IdeaProjects/RustApplication/rust_lib/target/aarch64-linux-android/debug/build/rust_lib-5b22bb56ef553d34/out/java_glue.rs:229:32
|
229 | let res = unsafe { (**env).ThrowNew.unwrap()(env, ex_class, c_message.as_ptr()) };
| ^^^^^^^^ unknown field
|
help: some of the expressions' fields have a field of the same name
|
229 | let res = unsafe { (**env).reserved.ThrowNew.unwrap()(env, ex_class, c_message.as_ptr()) };
| +++++++++
229 | let res = unsafe { (**env).v19.ThrowNew.unwrap()(env, ex_class, c_message.as_ptr()) };
| ++++
229 | let res = unsafe { (**env).v1_1.ThrowNew.unwrap()(env, ex_class, c_message.as_ptr()) };
| +++++
229 | let res = unsafe { (**env).v1_2.ThrowNew.unwrap()(env, ex_class, c_message.as_ptr()) };
| +++++
and 3 other candidates
error[E0609]: no field `AllocObject` on type `JNINativeInterface_`
--> /Users/kofiotuo/IdeaProjects/RustApplication/rust_lib/target/aarch64-linux-android/debug/build/rust_lib-5b22bb56ef553d34/out/java_glue.rs:249:42
|
249 | let jobj: jobject = unsafe { (**env).AllocObject.unwrap()(env, jcls) };
| ^^^^^^^^^^^ unknown field
|
help: some of the expressions' fields have a field of the same name
|
249 | let jobj: jobject = unsafe { (**env).reserved.AllocObject.unwrap()(env, jcls) };
| +++++++++
249 | let jobj: jobject = unsafe { (**env).v19.AllocObject.unwrap()(env, jcls) };
| ++++
249 | let jobj: jobject = unsafe { (**env).v1_1.AllocObject.unwrap()(env, jcls) };
| +++++
249 | let jobj: jobject = unsafe { (**env).v1_2.AllocObject.unwrap()(env, jcls) };
| +++++
and 3 other candidates
error[E0609]: no field `SetLongField` on type `JNINativeInterface_`
--> /Users/kofiotuo/IdeaProjects/RustApplication/rust_lib/target/aarch64-linux-android/debug/build/rust_lib-5b22bb56ef553d34/out/java_glue.rs:253:17
|
253 | (**env).SetLongField.unwrap()(env, jobj, field_id, ret);
| ^^^^^^^^^^^^ unknown field
|
help: one of the expressions' fields has a field of the same name
|
253 | (**env).v1_1.SetLongField.unwrap()(env, jobj, field_id, ret);
| +++++
error[E0609]: no field `ExceptionCheck` on type `JNINativeInterface_`
--> /Users/kofiotuo/IdeaProjects/RustApplication/rust_lib/target/aarch64-linux-android/debug/build/rust_lib-5b22bb56ef553d34/out/java_glue.rs:254:20
|
254 | if (**env).ExceptionCheck.unwrap()(env) != 0 {
| ^^^^^^^^^^^^^^ unknown field
|
= note: available fields are: `v1_1`, `v1_2`, `v1_4`, `v1_6`, `v9` ... and 2 others
error[E0609]: no field `GetArrayLength` on type `JNINativeInterface_`
--> /Users/kofiotuo/IdeaProjects/RustApplication/rust_lib/target/aarch64-linux-android/debug/build/rust_lib-5b22bb56ef553d34/out/java_glue.rs:267:35
|
267 | let length = unsafe { (**env).GetArrayLength.unwrap()(env, arr.inner) };
| ^^^^^^^^^^^^^^ unknown field
|
= note: available fields are: `v1_1`, `v1_2`, `v1_4`, `v1_6`, `v9` ... and 2 others
error[E0609]: no field `GetObjectArrayElement` on type `JNINativeInterface_`
--> /Users/kofiotuo/IdeaProjects/RustApplication/rust_lib/target/aarch64-linux-android/debug/build/rust_lib-5b22bb56ef553d34/out/java_glue.rs:273:31
|
273 | let obj = (**env).GetObjectArrayElement.unwrap()(env, arr.inner, i);
| ^^^^^^^^^^^^^^^^^^^^^ unknown field
|
= note: available fields are: `v1_1`, `v1_2`, `v1_4`, `v1_6`, `v9` ... and 2 others
error[E0609]: no field `ExceptionCheck` on type `JNINativeInterface_`
--> /Users/kofiotuo/IdeaProjects/RustApplication/rust_lib/target/aarch64-linux-android/debug/build/rust_lib-5b22bb56ef553d34/out/java_glue.rs:274:24
|
274 | if (**env).ExceptionCheck.unwrap()(env) != 0 {
| ^^^^^^^^^^^^^^ unknown field
|
= note: available fields are: `v1_1`, `v1_2`, `v1_4`, `v1_6`, `v9` ... and 2 others
error[E0609]: no field `GetLongField` on type `JNINativeInterface_`
--> /Users/kofiotuo/IdeaProjects/RustApplication/rust_lib/target/aarch64-linux-android/debug/build/rust_lib-5b22bb56ef553d34/out/java_glue.rs:277:31
|
277 | let ptr = (**env).GetLongField.unwrap()(env, obj, field_id);
| ^^^^^^^^^^^^ unknown field
|
help: some of the expressions' fields have a field of the same name
|
277 | let ptr = (**env).v19.GetLongField.unwrap()(env, obj, field_id);
| ++++
277 | let ptr = (**env).v1_1.GetLongField.unwrap()(env, obj, field_id);
| +++++
277 | let ptr = (**env).v1_2.GetLongField.unwrap()(env, obj, field_id);
| +++++
277 | let ptr = (**env).v1_4.GetLongField.unwrap()(env, obj, field_id);
| +++++
and 2 other candidates
error[E0609]: no field `DeleteLocalRef` on type `JNINativeInterface_`
--> /Users/kofiotuo/IdeaProjects/RustApplication/rust_lib/target/aarch64-linux-android/debug/build/rust_lib-5b22bb56ef553d34/out/java_glue.rs:279:21
|
279 | (**env).DeleteLocalRef.unwrap()(env, obj);
| ^^^^^^^^^^^^^^ unknown field
|
help: some of the expressions' fields have a field of the same name
|
279 | (**env).reserved.DeleteLocalRef.unwrap()(env, obj);
| +++++++++
279 | (**env).v19.DeleteLocalRef.unwrap()(env, obj);
| ++++
279 | (**env).v1_1.DeleteLocalRef.unwrap()(env, obj);
| +++++
279 | (**env).v1_2.DeleteLocalRef.unwrap()(env, obj);
| +++++
and 3 other candidates
error[E0609]: no field `NewObjectArray` on type `JNINativeInterface_`
--> /Users/kofiotuo/IdeaProjects/RustApplication/rust_lib/target/aarch64-linux-android/debug/build/rust_lib-5b22bb56ef553d34/out/java_glue.rs:296:26
|
296 | unsafe { (**env).NewObjectArray.unwrap()(env, arr_len, jcls, ::std::ptr::null_mut()) };
| ^^^^^^^^^^^^^^ unknown field
|
= note: available fields are: `v1_1`, `v1_2`, `v1_4`, `v1_6`, `v9` ... and 2 others
error[E0609]: no field `AllocObject` on type `JNINativeInterface_`
--> /Users/kofiotuo/IdeaProjects/RustApplication/rust_lib/target/aarch64-linux-android/debug/build/rust_lib-5b22bb56ef553d34/out/java_glue.rs:301:46
|
301 | let jobj: jobject = unsafe { (**env).AllocObject.unwrap()(env, jcls) };
| ^^^^^^^^^^^ unknown field
|
help: some of the expressions' fields have a field of the same name
|
301 | let jobj: jobject = unsafe { (**env).reserved.AllocObject.unwrap()(env, jcls) };
| +++++++++
301 | let jobj: jobject = unsafe { (**env).v19.AllocObject.unwrap()(env, jcls) };
| ++++
301 | let jobj: jobject = unsafe { (**env).v1_1.AllocObject.unwrap()(env, jcls) };
| +++++
301 | let jobj: jobject = unsafe { (**env).v1_2.AllocObject.unwrap()(env, jcls) };
| +++++
and 3 other candidates
error[E0609]: no field `SetLongField` on type `JNINativeInterface_`
--> /Users/kofiotuo/IdeaProjects/RustApplication/rust_lib/target/aarch64-linux-android/debug/build/rust_lib-5b22bb56ef553d34/out/java_glue.rs:305:21
|
305 | (**env).SetLongField.unwrap()(env, jobj, field_id, r_obj);
| ^^^^^^^^^^^^ unknown field
|
help: one of the expressions' fields has a field of the same name
|
305 | (**env).v1_1.SetLongField.unwrap()(env, jobj, field_id, r_obj);
| +++++
-- etc --
The text was updated successfully, but these errors were encountered:
I think this is related to jni-sys breaking change described in #450 .
The "JavaVM" was converted to union, so it becomes not compatitable with bindgen generated binding for jni.h C header file.
Hi there,
I wanted to try out this project but I'm faced with multiple errors
Here's my java_glue.rs.in file
lib.rs
java_glue.rs file
Here's the error
The text was updated successfully, but these errors were encountered: