Results 67 comments of SmileSky

I modified src/lib.rs: ```rust use android_activity::AndroidApp; use j4rs::jni_sys::{JavaVM, jint, jobject}; use j4rs::JvmBuilder; #[no_mangle] fn android_main(app: AndroidApp) { let jvm = JvmBuilder::new().detach_thread_on_drop(false).build().unwrap(); println!("{:?}", app); } const JNI_VERSION_1_6: jint = 0x00010006; #[allow(non_snake_case)]...

I may have made a mistake, perhaps I should use 'jni-rs' crate directly.

I understand what you mean, but I would like to use only cargo to build Android applications. But currently, the cargo-apk crate cannot compile Java or specify a jar path,...

To the best of my knowledge, the AndroidApp struct of android-activity provides a method called vm_as_ptr. I tried using j4rs::set_java_vm (app.vm_as_ptr()); Writing this way also has no effect. I found...

Understood, but I haven't found a place to set the jar path either.

Compared to cargo-apk, I tested that the xbuild tool is not very useful, at least in my Windows 10 environment, I have not successfully built Android applications. Compared to xbuild,...

That's right, it shows page not found.

Actually, my goal is to use pure rust to build Android applications. Cargo-apk is the best build tool I have ever used, but unfortunately it has been marked as deprecated.

PS E:\repositories\rust\android-support> x run -p example --device adb:rsga9xzlhmbecelv [1/3] Fetch precompiled artifacts info: component 'rust-std' for target 'aarch64-linux-android' is up to date Android.ndk.tar.zst [27s] ██████████████████████████████████████████████████████████ 66.73 MiB/66.73 MiB 📥 downloadedDownloading...