android-ndk-rs icon indicating copy to clipboard operation
android-ndk-rs copied to clipboard

Hi. You need add #[link(name = "android")]

Open Z1W3 opened this issue 3 years ago • 1 comments

#[link(name = "android")] // add this
extern "C" {
    pub fn AAssetManager_fromJava(env: *mut JNIEnv, assetManager: jobject) -> *mut AAssetManager;
}

Z1W3 avatar Jun 11 '21 06:06 Z1W3

I need this too, can't instantiate an AssetManager from java instance otherwise. This is essential if you have a Java application in addition to a native lib i.e. not a purely native activity.

azw413 avatar Jul 15 '22 09:07 azw413