---restore content starts---
Written on April 12, 2016
First step: Build an Eclipse development environment
1. Download Eclipse.zip on the Eclipse website to unzip it. There is no version requirement, but it should match the number of digits in the computer. such as: The computer is 64-bit, download the 64-bit version.
2. Download the JDK, the Java Development Kit. You can write Java programs with the JDK. You can download the jdk,1.7 version on the Oracle website. Note: If the computer is 64-bit, download the 64-bit version.
3. Configure the environment variables for the JDK.
(1) java_home:d:\java\jdk1.7.0_75 ( the directory where you installed the JDK )
(2) Path: At the beginning of the addition of%java_home%\bin;
(3) CLASSPATH:.; %java_home%\lib\tools.jar;%java_home%\lib\dt,jar;%java_home%\bin;
After the environment variable configuration is complete, you can check to see if the JDK is installed successfully. Open the cmd window and enter Java–version to view the version information for the JDK. The Version Information screen appears, indicating that the installation was successful.
At this point, Eclipse is ready to develop Java programs.
Ii. Step Two: Build an Android development environment in eclipse
1. The latest version of the ADT plugin can be downloaded from the http://www.androiddevtools.cn/ website, and the ADT plugin exists as a bridge between Eclipse and ANDROIDSDK. It is recommended that you download the latest version of ADT so that the version of the upward-compatible SDK will be higher.
After the download is complete, install it offline. The steps are as follows:
-
Start Eclipse ; Select Help > Install New Software
-
In the upper right corner, click the Add button;
-
In the Add Library dialog box, click Archive Local installation.
-
Select the downloaded file adt-23.0.4.zip(不用解压,直接选择压缩包即可), and click OK. Enter the name of the ADT plug-in and click OK.
-
In the Software dialog box, select the check box and click Next ...
2. Install the android-sdk. download a ready-to-use SDK, where you can configure the environment variables:
(1) ANDROID_SDK_HOME:F:\ADT-BUNDLE-WINDOWS-X86_64-20140321\SDK ( the directory where you installed the SDK )
(2) Path:%android_sdk_home%\platform-tools;%android_sdk_home%\build-tools;
"Tips": If it appears: Android SDK manager cannot get a list of updated versions
Try this:
Website: mirrors.neusoft.edu.cn
PORT: 80
After completion:
- Choose Window > Preferences ...
- On the left panel select Android, then on the right click Browse ... and check the SDK path, this machine is: F:\ADT-BUNDLE-WINDOWS-X86_64-20140321\SDK.
- Click Apply,ok. Configuration is complete.
When the Android environment is set up, the OPENCV environment is built below.
Third step:Android latest NDK R10 under Windows Development environment Building
Reference Blog: http://www.cnblogs.com/zdz8207/archive/2012/11/27/android-ndk-install.html
1. Download Android NDK
Inhttp://www.androiddevtools.cn/The NDK can be downloaded from the website, downloaded and unzipped to your working directory, for example: F:\android-opencv\android-ndk-r10e. The Samples folder below contains 12 instance development demo projects and is a good resource for learning. 2. Installing the cygwinc/c++ compilation environment requires the Linux GCC compiler, which simulates Linux in a Windows environment using the Cygwin, which can be compiled and generated by C + +. So dynamic link library, and then the project into Android can be run.Install Cygwin:1. Run the Setup.exe program and click Next to proceed to the next step. 2. Select the installation method. For the first time, you can use direct connection to download the installation online and select the first button. (If you have an off-the-shelf offline package, you can choose to install it offline (installed from Local Directory).) 3. Select the installation directory. For example D:\Cygwin, note that this directory refers to Cygwin the virtual machine's installation directory, not the download file staging directory, nor the NDK directory. 4. Set the local package staging path. The staging directory by default is placed in the Setup.exe's sibling directory my is F:\android-opencv\http%3a%2f%2fmirrors.163.com%2fcygwin%2f, can be backed down.
---restore content ends---
Steps to build a ECLIPSE+ANDROID+OPENCV environment