First android NDK instance

Source: Internet
Author: User

It took me almost a day to get started with NDK. I posted some of the issues that are prone to problems on my own), first in 1. when cygwin is installed, it is slow to select the download URL ~~ I think the download speed of http: mirrors.kernel.org is quite fast.

2. cygwin has a required package: autoconf2.1, automake1.10, binutils, gcc-core, gcc-g ++, gcc4-core, gcc4-g ++, gdb, pcre, pcre-devel, gawk, make a total of 12 packages. You just need to download these packages.

3. environment variable configuration: Open cygwin under the cygwin root directory. bat writes the following settings to 650) this. width = 650; "title =" environmental variation .png "src =" http://www.bkjia.com/uploads/allimg/131228/095534A09-0.png "/>

Several SET statements are the content to be inserted.

<Jdk path> <ndk path "represents the paths of your JDK and NDK respectively.

As shown in my settings for this file: 650) this. width = 650; "title =" environmental variation 2.png "src =" http://www.bkjia.com/uploads/allimg/131228/0955344V3-1.png "/>

 

After the settings are completed, the cygwin. bat environment variables will be started in the future!

4. You do not need to operate on cygwin to convert a java file into a. h file, but simply do it on a windows terminal! I started to make mistakes in cygwin, and I will do it later!

Javah-classpath. bin/classes-jni com. example. jni. Myjni so that the. class is changed to. h. The rest of the file is not much said, you can refer to the http://my.oschina.net/sosofy/blog/78353 to write quite well!

There are several issues!

This article is from the "hhgj" blog, please be sure to keep this source http://chinatong.blog.51cto.com/6363907/1294929

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.