使用assert来调试程序 ,需要打开下面其中一项配置
- use NDK_DEBUG=1 argument in ndk-build commandline
- add android:debuggable="true" to < application > tag in AndroidManifest.xml
- add APP_OPTIM := debug to your Application.mk file - this will also disable optimizations and will compile with debug symbols
android.mk 中引入其他的android.mk编译, 注意顺序
LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := surecn_demo
LOCAL_SRC_FILES := surecn_demo.c base64.c
LOCAL_LDLIBS += -llog
LOCAL_WHOLE_STATIC_LIBRARIES := surecn_module_native
include $(BUILD_SHARED_LIBRARY)
include jni/native/Android.mk