NDK Environment Setup

Source: Internet
Author: User

Self-study terrible electromagnetic field and electromagnetic waves just back, too TM difficult, hey, or into today's theme summed up today just set up the NDK environment bar, Nonsense said, begin:android development sometimes involves calling C or C + + code this time need to use the NDK (native Development Kit) tool, the NDK is built in several ways, and is commonly used in Win7 under the CYGWIN,NDK two software But now the new version of ADT-BUNDLE-WINDOWS64 (internal integration of ADT and other plug-ins) can be built directly inside the NDK, but I think esclipse is more prone to error, especially in the update version of the time,    In order to avoid the next change Esclipse (the first two days have been replaced once) also to replace the NDK, configuration environment and so on, so I do not install the NDK esclipse inside. 1. Environment Preparation and introduction: Win7 64-bit, cygwin,android-ndk-r10c

cygin:http://www.cygwin.com/according to the PC operating system download the corresponding version, for example, I am win7 64bit download setup-x86 64.exe.

ndk:http://developer.android.com/tools/sdk/ndk/index.html download the corresponding computer operating system version.
      Cygwin is software for simulating Linux environments on Windows, primarily for make and compile C/s.     2.NDK download       Download, unzip, anywhere, but note that the file directory does not contain spaces, or later compile may be error. I unzip to C:\cygwin\ndk\android-ndk-r10c.     3.Cygwin download       above address download and run Setup-x86-64.exe as follows (part of the net is borrowed, steal a lazy)               red box for online download and installation, click Next after:             Select an installation directory and click Next to follow: & nbsp             Select the directory where the downloaded files are stored, click Next after:            Click on the view in the upper right corner to make the display mode full, keep the bottom left check state, enter make in search and click on the previous skip (and make version will appear) so that the bin corresponds to the fork box, Then in search, enter Gcc-core, gcc-gcc+ repeat the action of make, here to download make, Gcc-core, gcc-gcc+ These components can meet the needs of the current need to promote what to wear. After selecting these components, click Next and it will begin to download and install, and you will soon be able to mount the following:             finish after clicking on the desktop shortcut. You want to change the background color font subclass right-click Options to set it up just fine.       Enter the command make-v in the window, gcc-v check whether the installation is successful, the following window will show succeed.      

(This figure looks a little bigger)
4. Add ndk into Cygwin

Go to the Cygwin installation directory c:\cygwin\cygwininstall\home\[your computer user name]\ directory there is a. Bash_profile text opens in Notepad at the end add the following two lines of code: ndk=/cygdrive/c/       CYGWIN/NDK/ANDROID-NDK-R10C Export NDK (note that these two lines of code must be close to the contents of the text do not have spaces and so on, there will be reminders, but also note that must be a backslash/). Here is another problem, some people home directory is empty, such as I myself is so, how to do, in the environment variable settings in the user environment variable home Delete (this should know otherwise jdk and so is how to configure, do not know also does not matter, Baidu handed), and then create a new [ Computer User Name] folder (such as Luohxx), and then from the C:\cygwin\cygwininstall\etc\skel inside the documents are all copied to Luohxx, At the end of each text with the above two lines of code (here I have a bit of doubt is the full copy of the past or copy which one or two of the text is good, but. Bash_profile this is to copy, lazy, not to check the information;       Inputrc that text does not need to add those two lines of code otherwise cygwin inside cannot enter the letter R). Enter the CD in the Cygwin window $NDK if the following result is successful:

Note: if-bash:$ ' \ R ' is present in Cygwin: Command not found (in fact, it does not matter, does not affect this is the format of the problem)

can refer to http://www.cnblogs.com/sanxc/archive/2012/03/29/2423785.html my solution is slightly different from the above mentioned only for reference, there is a picture of the truth is as follows: That is, add the two lines of code close to the text     Content.     Is fast 12 o'clock, alas, lights out, I was playing with a lamp, and immediately broke the net, really bitter force ah, staring at the computer too long recently the neck has a little pain, think of also to review electromagnetic fields and electromagnetic waves, the heart is drunk. If there are errors in the text, you are welcome to advise.

NDK Environment Setup

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.