Install NDK in Eclipse/Android Studio
来源:互联网 发布:json是用来干嘛的 编辑:程序博客网 时间:2024/05/16 05:25
Install NDK in Eclipse/Android Studio
1、 Download NDK
https://developer.android.com/tools/sdk/ndk/index.html
2、Install NDK
$ tar xvf android-ndk-r8e-linux-x86_64.tar.bz2 -C ~/Software/Android/$ cd Android$ mv android-ndk-r8e/ ndk/
3、add PATH
$ vim ~/.bashrc//----------------- add the following text ----------------------export NDK_HOME=/home/linx/Software/Android/ndkexport PATH=${NDK_HOME}:$PATH//------------------------------------------------------------------------$ source ~/.bashrc
4、test the ndk
$ pwd~/Software/Android/ndk/samples/hello-gl2$ ndk-buildCompile++ thumb : gl2jni <= gl_code.cppStaticLibrary : libstdc++.aSharedLibrary : libgl2jni.soInstall : libgl2jni.so => libs/armeabi/libgl2jni.so
the object file is "libs/armeabi/libgl2jni.so"
the ndk install success.
then add the ndk to IDE.
Eclipse :
1、download CDT
1) offline
http://www.eclipse.org/cdt/downloads.php
2) online
Help -> Install New Software
add the URL
http://download.eclipse.org/tools/cdt/releases/juno/
then the CDT install automatic.
2、run ndk-build in the project exist
$ pwd~/Software/Android/ndk/samples/hello-jni$ ndk-build
3、Import the project first
File -> New -> Project.. -> Android Project from Existing Code
browse form the project root directory.
4、config the NDK in IDE
1) File -> Properties
2) builders -> New -> Program -> OK
3)in Edit Configuration
Name : hellojni (the project you want to build)
Table Main :
Location :/bin/bashWorking Directory :/binArguments :-c "cd ~/Software/Android/ndk/samples/hello-jni/ && ndk-build"
Table Refresh :
click on "Refresh resources upon completion."then choose the "Specific resources"finally choose the "libs" in "Specific resources" and Finish it
Table Build Options :
click on everything in "Run in builder"then choose the "Specify Resources"finally choose the "jni" in "Specify Resources"
Finish.
- Install NDK in Eclipse/Android Studio
- Support NDK in Android studio.
- android NDK install and config in ubuntu
- Unable to install Android Studio in Ubuntu
- install android studio in ubuntu linux
- 让android studio 支持 eclipse NDK工程
- Eclipse转Android Studio-NDK开发
- install pydev in eclipse
- eclipse配合Android Studio部署Android NDK开发环境
- To Install Android Studio in Ubuntu 16.04 and Ubuntu 17.04
- The new NDK support in Android Studio 1.3
- 使用Android Studio与Eclipse开发NDK的对比
- NDK开发-简介&环境搭建(Eclipse,Android Studio)
- Eclipse代码转Android Studio NDK报错处理记录
- Android Studio 1.3/1.4 无法更新下载Android NDK:install failed please check your network
- android studio install
- Android Studio Install
- install Ubuntu & Android Studio
- 网络通信学习(更新...)
- report 当字段显示的数据太多时,自动换行跨页的问题
- 性能 内存
- 前端攻略系列
- hadoop的运行
- Install NDK in Eclipse/Android Studio
- 一款非常经典的rpg武侠游戏ios源码下载
- 后缀数组的DC3构造法
- 用CURL获取短连接
- ASIHTTPRequest 详解
- openstack-cinder_lvm_driver命令汇总 (上)
- Matrix
- SoftComz 软商创业记录(一)
- ICE和thrift比较