Undefined reference to AAssetManager_fromJava

后端 未结 5 1833
耶瑟儿~
耶瑟儿~ 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 10:09

    find_library( # Sets the name of the path variable.
        log-lib
    
        # Specifies the name of the NDK library that
        # you want CMake to locate.
        log
    )
    
    find_library(android-lib android)
    
    target_link_libraries( # Specifies the target library.
        hll
        ${log-lib}
        ${android-lib}
        # Links the target library to the log library
        # included in the NDK.
    )
    

提交回复
热议问题