简介
最近事情比较多,好久没写博客了,现在回头补一补
开始
- 下载
Jsoncpp源码以及编译脚本
git clone https://github.com/open-source-parsers/jsoncpp.git
git clone https://github.com/allanmax/a_jsoncpp_android.git
将下载的jsoncpp源码放到a_jsoncpp_android下
如果需要支持低版本设备,比如Android 4.4(19),则要在jni/Application.mk添加以下内容
APP_PLATFORM := android-19
-
编译
jsoncppcd a_jsoncpp_android ndk-build如果出现以下提示:
APP_STL gnustl_shared is no longer supported. Please switch to either c++_static or c++_shared. See https://developer.android.com/ndk/guides/cpp-support.html for more information.则修改
jni/Application.mk,将gnustl_shared改成c++_static即可输出的文件在
obj/local目录下