Error:(606) undefined reference to `__android_log_print'解决办法
2018-01-15 17:18
399 查看
在NDK开发时,如果c代码中想要打印log,但是运行时直接报出错误:
问题原因是需要在Module中的build.gradle中增加如下代码:
增加完成后就OK啦
Error:(606) undefined reference to `__android_log_print'
问题原因是需要在Module中的build.gradle中增加如下代码:
android { compileSdkVersion 26 buildToolsVersion "26.0.0" defaultConfig { applicationId "com.krttech.get_c_to_so" minSdkVersion 19 targetSdkVersion 26 versionCode 1 versionName "1.0" testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" ndk { // 设置支持的 SO 库构架 moduleName "Judgment" ldLibs "log"//实现__android_log_print abiFilters 'armeabi', 'armeabi-v7a', 'arm64-v8a', 'x86' } } ... }
增加完成后就OK啦
相关文章推荐
- Visual GDB进行Android NDK开发,报错:error : undefined reference to '__android_log_print' 解决办法
- 问题“undefined reference to `android_log_print”的解决办法
- JNI编程-- undefined reference to `__android_log_print' 的解决办法
- 解决Error: undefined reference to `__android_log_print'
- undefined reference to `__android_log_print'解决
- undefined reference to '__android_log_print' 的解决
- undefined reference to `__android_log_print'解决
- 关于android底层库编译出现“undefined reference to `__android_log_print'”的解决方法
- "android-studio undefined reference to `__android_log_print "错误解决方法
- error undefined reference to '__android_log_print'
- undefined reference to `__android_log_print'解决
- undefined reference to `__android_log_print'解决
- android ndk添加打印 解决undefined reference to __android_log_print'问题
- undefined reference to `__android_log_print'解决
- undefined reference to 'GetStockObject@4 linker error 的解决办法
- jni编译问题:jin中添加LOG方法以及undefined reference to `__android_log_print'错误
- Android NDK 编译时候出现 undefined reference to `__android_log_print
- Qt undefined reference to,Error 255,找不到库函数的解决办法
- 安卓 jni 开发错误 undefined reference to __android_log_print
- android-studio undefined reference to `__android_log_print