Ubunu build android NDK environment under

2011-05-06  来源:本站原创  分类:OS  人气:152 

1, download NDK: Address:
http://dl.google.com/android/ndk/android-ndk-r4b-linux-x86.zip
2, extract:
sudo apt-get install unzip
unzip android-ndk-r4b-linux-x86.zip
3, enter the directory to see a document
cd android-ndk-r4b
Which build, doc, samples, sources directory, doc directory, there are some documentation, such as how to use the ndk-build (which in previous versions is the implementation of build / host-setup.sh initialization, then do make APP = xxxx (where the hello-jni) to complete the compilation). ANDROID-MK.TXT mk file explains how to write, and other help documentation.
4, configuration NDK environment variables in ~ /. Bashrc file to add at the end:
NDK = ~ / android-ndk-r4b
export NDK
5 to see whether the effect
echo $ NDK
6, compiling the sample programs:
Method One:
cd samles / hello-jni
NDK / ndk-build
Method Two:
NDK / ndk-build-C ~ / android-ndk-r4b/samles/hello-jni
-C directory path specified works
******************* Two methods are generated in the current directory libs and obj subdirectories
7, open eclipse, create a new android project, pay attention: here not to "New" project, but to create project from existing sources (create project from existing source); Note sdk version level to meet the minimum requirements of the example program (here min 3)
8, create a project is completed, open the jni directory hello-jni.c can modify the string, I changed "Gaga, I 'm developing android!", And then back to the command line, re-run the NDK / ndk-build command, which re-compile the project, go back to eclipse, to refresh the entire project;
9, a new simulator (1.5), then run the sample program, you can see just changed the strings appear in the simulator textview.

Appendix: android NDK Official Download:

Android SDK 3.0
Windows
http://dl.google.com/android/installer_r10-windows.exe
http://dl.google.com/android/android-sdk_r10-windows.zip
Mac OS X (intel)
http://dl.google.com/android/android-sdk_r10-mac_x86.zip
Linux (i386)
http://dl.google.com/android/android-sdk_r10-linux_x86.tgz

Android NDK r5b
Windows
http://dl.google.com/android/ndk/android-ndk-r5b-windows.zip
Mac OS X (intel)
http://dl.google.com/android/ndk/android-ndk-r5b-darwin-x86.tar.bz2
Linux
http://dl.google.com/android/ndk/android-ndk-r5b-linux-x86.tar.bz2

Android SDK 2.3
Windows
http://dl.google.com/android/android-sdk_r08-windows.zip
http://dl.google.com/android/installer_r08-windows.exe
Linux (i386)
http://dl.google.com/android/android-sdk_r08-linux_86.tgz
MAC OS X (intel)
http://dl.google.com/android/android-sdk_r08-mac_86.zip

Android NDK r5
Windows
http://dl.google.com/android/ndk/android-ndk-r5-windows.zip
Mac OS X (intel) r5
http://dl.google.com/android/ndk/android-ndk-r5-darwin-x86.tar.bz2
Linux 32/64-bit (x86) r5
http://dl.google.com/android/ndk/android-ndk-r5-linux-x86.tar.bz2

相关文章
  • Ubunu build android NDK environment under 2011-05-06

    1, download NDK: Address: http://dl.google.com/android/ndk/android-ndk-r4b-linux-x86.zip 2, extract: sudo apt-get install unzip unzip android-ndk-r4b-linux-x86.zip 3, enter the directory to see a document cd android-ndk-r4b Which build, doc, samples,

  • How to build Android development environment under Windows (to) 2010-10-11

    Development environment to build Android Download the Android SDK 1 http://code.google.com/android/download.html http://www.cnd8.com/soft/25873.htm This is the official website, go into the process followed to select for your platform (in this case W

  • Mobile Development How to build Android development environment under Windows 2010-08-11

    http://blog.csdn.net/Mac_cm/archive/2009/01/06/3720492.aspx

  • Development environment to build Android 2010-03-29

    Android development is now in full swing, presume it is not very busy, and learn from the next, here recorded in the windows on how to build Android development environment, he was a record entry of new brothers and sisters, for reference! (1) instal

  • [Android Xinshoubikan] Android development environment to build 2010-11-25

    [Android Xinshoubikan] Android development environment to build Android development environment to build, for a java developer, is very simple, but some of the android just getting started do not know how to build, Or help these little brothers, as l

  • android ndk note attached to the information environment to build 2010-10-21

    ndk environment to build, cost a lot of time, I think is that the document in the annex below, androidndk the zip package has 24M can not upload, everyone to download the. Note 1: Cyg will be installed when the error can be directly recognized Note 2

  • Android NDK r4 windows environment to install 2010-07-19

    Android NDK r4 windows environment to install Online read a lot of people this post, the basic version are based on the previous r3, because Android NDK r4 is the recent release of some changes, so this installation process redefined. Installation En

  • Android development environment to build Record 2010-03-29

    Android development environment to build is actually very simple, need time to pay attention in the development of some of the details. In this paper, a running account, in the form of record of the author Installation and Configuration Android devel

  • Graphic describes detailed steps to build Android environment 2010-03-29

    I Environmental Vista sp2 + Eclipse 3.3, is mainly a record of the process he has built himself, but also want to give our brothers and sisters just to get into help. JDK configuration of course, is necessary, can go to the official sun http://java.s

  • Build a good environment after the first Android project 2010-03-29

    Following the article Android built environment, this was a write how to create a simple Android project, to the entry of xdjm a little help. Open the Eclipse (like oh crap), click the menu File-> New-> Android project In the project name enter: and

  • Android ndk r4 development environment set up 2010-08-11

    Not been updated for a long time, and the project is really busy, because the project needs, will use the latest ndk, the android ndk r4b version, The environment is not the same structures called in the past, has made significant changes, and also s

  • Eclipse build Android java development environment 2010-08-18

    http://www.cnmsdn.com/ 2010 Last 08 Day 18:42 Collection Android development environment set up 1 Download Android SDK http://code.google.com/android/download.html This is the official web site, go into the process is followed, choose on their own pl

  • Development environment to build Android 2.2 2010-10-01

    Development environment to build Android 2.2 The past few days have seen a few good applications on Android, itching, and I want explore the world of Android, so determined to learn about the development of Android technology. :) Then of course, is t

  • Full demo android development environment to build process 2010-10-20

    Reprinted: http://hi.baidu.com/lvjava/blog/item/74a8480ee120e0c67acbe10f.html Download a (1) java JDK download: Access to the website: http://java.sun.com/javase/downloads/index.jsp (or click to download) the following diagram: Choose Download JDK do

  • Android + Eclipse environment to build 2010-10-25

    Recent Android development environment in the configuration having a point problem, start the download is Eclipse3.5.2 (eclipse-SDK-3.5.2-win32.zip), but the installation always prompt when the ADT plug-in can not find a number of JAR package, and fi

  • Android Tutorial II: Linux development environment for the next build Android 2010-11-12

    Speaking in the window under the previous development environment to build Android, the overall relatively simple. This time to talk about the Linux development environment to build Android, very popular here, mainly in the Ubuntu operating system, f

  • With the eclipse development environment to build Android Detailed 2010-11-17

    Android development environment to build one or Download (1) JDK download: Access to the website: http://java.sun.com/javase/downloads/index.jsp (or click to download) the following diagram: (2) eclipse download into the web page: http://www.eclipse.

  • Android development environment to build complete ~ 2010-11-21

    Android development environment to build a good record at last Method is to first download the ADT and the SDK, Eclipse and JDK have previously ADT and then install the SDK separately ADT, then in Eclipse's Help --- Install New Software in the archiv

  • Android development environment to build the windows 2010-12-02

    This is the opening to be technical documents, because now is the content of the work and the android-related articles so may later after playing a lot and it will be handed. Not more than that, I hope you are interested in more exchanges Ha! Android

  • android Android development environment to build 2010-12-14

    Development environment to build Android Android provides for the development of plug-ins eclipse Android Development Tool (ADT, android development tools). ADT must have the support of Elipse and Android SDK, and Eclipse must have the support of JDK