I have trying to get the asset manager to work, and I always get the following error “Error:(550) undefined reference to ‘AAssetManager_fromJava'” I tried multiple ways of adding the library, but none seem to work I tried adding an Android.mk file, and adding the library there, I tried adding it the gradle script, and finally I tried adding it to the CMakeLists.txt. None seem to work, it either breaks gradle, CMakeList, or gets a sync error, do not know what to do, I hope someone can help I tried all the suggestions mentioned here Code:
extern "C"
JNIEXPORT void JNICALL Java_com_bsmtechnologies_locatorsource_MainActivity_load(JNIEnv *env, jclass type, jobject assetManager) {
AAssetManager *mgr = AAssetManager_fromJava(env, assetManager); if (mgr == NULL) { LOGE("Error loading asset maanger"); } else { LOGD("Loaded asset manager"); }
}