diff --git a/Cargo.toml b/Cargo.toml index a28d23d42..548693fe2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -72,7 +72,7 @@ web-sys = { version = "0.3.35", features = [ "AudioContext", "AudioContextOption oboe = { version = "0.6", features = [ "java-interface" ] } ndk = { version = "0.8", default-features = false } ndk-context = "0.1" -jni = "0.19" +jni = "0.21" [[example]] name = "android" diff --git a/src/host/oboe/android_media.rs b/src/host/oboe/android_media.rs index 099c652f6..f2a958031 100644 --- a/src/host/oboe/android_media.rs +++ b/src/host/oboe/android_media.rs @@ -13,7 +13,7 @@ pub const CHANNEL_OUT_STEREO: i32 = 12; fn with_attached(closure: F) -> JResult where - F: FnOnce(&JNIEnv) -> JResult, + F: FnOnce(&mut JNIEnv) -> JResult, { let android_context = ndk_context::android_context(); let vm = Arc::new(unsafe { JavaVM::from_raw(android_context.vm().cast())? });