mac 上 配置 Android NDK 环境
16lz
2021-01-23
由于跨平台的原因,需要在mac 上 编译 android 需要的 so文件, 记录一下环境配置
1 下载NDK for Mac
developer.android.com/ndk/downloads/index.html
2 解压 下载的 bin文件
1) 获取文件权限
chmod a+xandroid_ndk_r10c_version.bin
2) 解压文件
./android_ndk_r10c_version.bin
3 配置 .bash_rofile文件
打开终端,输入open ~/.bash_profile( 如果文件不存在,创建命令 touch ~/.bash_profile)
添加这样的内容
exportPATH=$PATH:/Users/zhangxiao/Sourcecode/android-ndk-r10e
4 编译 hello-jni 测试 环境是否配置成功
到 samples/hello-jni目录下,运行ndk-build, 测试是否能编译出 hello-jin.so更多相关文章
- Android命令行测试BT,WIFI,Sensor工作状态
- Ubuntu下android开发环境搭建
- Android文件关联
- Android Studio项目应该提交哪些文件到GitHub上
- Android下文件操作模式(含SDCard的读写)
- Android 中的单元测试(使用AndroidTestCase 进行 Content Provid