小编lar*_* lu的帖子

Android ndk(cmake):在第二个jni库中使用log api时对'__android_log_write'的未定义引用

我使用Android Studio 2.2和cmake来构建jni文件.

我想显示登录jni文件但收到错误消息"未定义引用`__android_log_write".

我的CMakeLists.txt文件是:

add_library( # Sets the name of the library.
         native-lib

         # Sets the library as a shared library.
         SHARED

         # Provides a relative path to your source file(s).
         # Associated headers in the same location as their source
         # file are automatically included.
         src/main/cpp/native-lib.cpp )

add_library( # Sets the name of the library.
         test-lib

         # Sets the library as a shared library.
         SHARED

         # Provides a relative path to your source file(s).
         # Associated headers in …
Run Code Online (Sandbox Code Playgroud)

java-native-interface android cmake android-ndk

5
推荐指数
1
解决办法
5574
查看次数