cmake 构建就没这个问题

c++库的问题

  • (https://developer.android.com/ndk/guides/cpp-support?hl=zh-cn)
  • 使用NDK-BUILD 直接构建:
AAtransMBP:android lijin$ /Users/lijin/Library/Android/sdk/ndk-bundle/ndk-build Android NDK: WARNING: APP_STL gnustl_static is deprecated and will be removed in the next release. Please switch to either c++_static or c++_shared. See https://developer.android.com/ndk/guides/cpp-support.html for more information.    

双重保险

  • Application.mk 里
APP_STL := c++_staticAPP_CPPFLAGS := -frtti -fexceptions -std=c++11APP_ABI := armeabi-v7aAPP_PLATFORM := android-21
  • gralde 里
        ndk {            moduleName "ccsdk"            abiFilter "armeabi-v7a"            stl "c++_static"            ldLibs "log"        }

如果怕有风险

#include #include #if defined(__ANDROID__)#define TO_STRING to_stringAndroidtemplate <typename T>inline std::string to_stringAndroid(T value){    std::ostringstream os ;    os << value ;    return os.str() ;}#else#define TO_STRING std::to_string#endif

更多相关文章

  1. mybatisplus的坑 insert标签insert into select无参数问题的解决
  2. 箭头函数的基础使用
  3. NPM 和webpack 的基础使用
  4. Python list sort方法的具体使用
  5. 【阿里云镜像】使用阿里巴巴DNS镜像源——DNS配置教程
  6. Android运行报错:Error: Static interface methods are only supp
  7. Android系统工具之Roblectric 使用过程中问题总结
  8. Android(安卓)自定义View measure模板
  9. 2013.03.19(3)———android ActivityGroup的一些问题

随机推荐

  1. MySQL使用聚合函数进行单表查询
  2. MySQL数据定义语言DDL的基础语句
  3. Mysql之组合索引方法详解
  4. mysql中 ${param}与#{param}使用区别
  5. MySql COALESCE函数使用方法代码案例
  6. The MySQL server is running with the -
  7. 详解 Mysql 事务和Mysql 日志
  8. Navicat出现无法远程连接MySql服务器问题
  9. sql四大排名函数之ROW_NUMBER、RANK、DEN
  10. Mariadb远程登陆配置及问题解决