I use Android Studio 2.2 and cmake to build jni file.
I want to show log in jni file but get error message \"undefined reference to `__android_log_write\".
M
I finally found I should separated to do the link.
target_link_libraries( # Specifies the target library.
test-lib
native-lib
# Links the target library to the log library
# included in the NDK.
${log-lib} )
target_link_libraries( # Specifies the target library.
native-lib
# Links the target library to the log library
# included in the NDK.
${log-lib} )