Undefined reference to AAssetManager_fromJava

后端 未结 5 1740
耶瑟儿~
耶瑟儿~ 2021-02-19 09:36

I am trying to access assets from an android apk using AAssetManager. However, I keep getting \"Undefined reference to AAssetManager_fromJava\" even though I\'ve included asset

5条回答
  •  挽巷
    挽巷 (楼主)
    2021-02-19 09:55

    My mistake. I didn't have "android" library added to the linker. I have actually setup NDK dev environment on Visual Studio Express and "android" library wasn't added to my project by default.

    If you are using makefiles, be sure to add -landroid to your LOCAL_LDLIBS when using native AssetManager.

提交回复
热议问题