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
Android Studio developers, İf you have ExternalNativeBuild file which is called "CMakeList.txt" you must append this code to the file CMakeList.txt
find_library( # Sets the name of the path variable.
android-lib
# Specifies the name of the NDK library that
# you want CMake to locate.
android )
target_link_libraries(
${log-lib}
${android-lib})
if you also have native lib you can add easily like this
target_link_libraries( native-lib
${log-lib}
${android-lib})
It should work!