CAD controls: Steps to build an environment for Android

Source: Internet
Author: User

Control name: Dream. Think... Cad.... control;

1. Environment Construction : 3

1.1, Download Android SDK 3

1.2, Download Eclipse 4

1.3, Download JDK6 5

1.4, to be Eclipse installation ATD plug-in 7

1.5, Run Eclipse Set Android ADT plug-in 9

1.6, NDK Installation 12

1.7, installation Cygwin 13

1.8, python2.7.3 16

1.9, Create Virtual Machine 18

1.10, compiling and running controls Android example 19

20


1. Environment Construction :

1.1. Download Android SDK

http://developer.android.com/sdk/index.html, the URL needs to be accessed through the wall.

(It is recommended to strictly follow the documentation steps, such as the later version of Ndk,python to use the document )

This is the official website, enter and follow the process to go, choose the appropriate for their platform (here is Windows) SDK package download. After downloading the direct decompression can be used.

Let's unzip it and put it in the D: \android\adt directory.

To use the SDK tools directly in the DOS console, you can add the SDK's directory to the Windows PATH environment variable: On the desktop, right-click My Computer, tap properties > Advanced > Environment variables. Double-click the path entry in system variables to add the full path to the tools directory in the Android SDK here

1.2. Download Eclipse

http://www.eclipse.org/downloads/

We'll unzip it and put it in the D:\Android\eclipse directory.

Create the C:\Android \eclipse\eclipse.exe shortcut to the desktop as follows:

1.3. Download JDK6

http://java.sun.com/javase/downloads/index.jsp

Download and install the Java development Package

After installing the directory, and files, note now that the latest JDK installation does not support WinXP, It is recommended to use the win7 system :

We installed in D: \android\jdk

Then you need to use the environment variables, such as "My Computer ", " properties " , " advanced " , to create a new java_home environment variable , point to the JDK The directory , as follows

1.4. to be Eclipse installation ATD Plug-in

Run Eclipse, select "Help" > "Install New Software"

Click "Add" button to add the following installation URL to determine the installation

Select as, and then click "Next" to install .

If the network connection is slow and cannot be downloaded, you can download its offline installation package as follows:

Then select Install as follows:

1.5. Run Eclipse Set Android ADT Plugins

Restart Eclipse for Android SDK settings:

Select "Windows" > "Preferences ..." to open the Edit Properties window

Select Android Properties panel

Join the Android SDK directory (click "Browse ..." to make a selection, this is the directory where "Android-sdk" is located)

Such as:

Run SDK Manager.exe to install the relevant files for Android development.

Select the following, then click"Install", this installation process is slow, need to turn over the wall to access

1.6. NDK installation

The android-ndk-r9d that the control uses:
- Address:https://dl.google.com/android/ndk/android-ndk-r9d-windows-x86.zip

Address:https://dl.google.com/android/ndk/android-ndk-r9d-windows-x86_64.zip

Unzip the NDK to D:\Android\Ndk .

Such as:

Set the ndk path to the system variable:

1.7. installation Cygwin

Since most of the NDK development involves compiling and running in the GCC Environment, C + + , in Windows Environment, you need to simulate the Linux Simulation compilation environment:
http://www.cygwin.com/
Download setup.exe file. Http://cygwin.com/setup-x86_64.exe(I use the system, so download x86_64)

Run setup-x86_64.exe, installed in D:\Android\cygwin:

If the installation is too slow, we have an offline installation package here , contact qq:827867134.

Setup-x86.exe ( system Setup-x86_64.exe) running the offline installation package, select "install from local directory" Specify the installation location, then select the directory in the offline package and click Install.

Note: During the installation process, if the prompt "libkbdsg.a" installation fails, you need to put the antivirus software on the computer, the computer steward Uninstall, and then install.

Modify

D:\Android\cygwin\etc\profile

Set PATH variables

Path= "/usr/local/bin:/usr/bin:${path}:/cygdrive/d/android/adt/sdk/platform-tools:/cygdrive/d/android/ndk:/ Cygdrive/d/android/adt/sdk/tools;/cygdrive/d/android/ant/bin "

To set the Windows path variable, it is convenient to find Cygwin, as follows:

1.8. python2.7.3

:http://www.python.org/download/releases/2.7.2/

After downloading, install:

. Configuring the Environment

Right-click " computer " , select < span> properties "---- " " advanced system settings " < span> advanced " tab, select " environment variable "!&NBSP;

Under " system Variables " , Select "Path"and click on the Edit button below:

Similarly, the value of the variable "Pathext" is added . PY;. PYM .

1.9. Create Virtual Machine

Run "Windows"+"Android Virtual Device Manager",

On the interface, create a new virtual machine with the following settings :

1.10. compiling and running the control Android example

unzip the control's trial package ( mxdraw6.0android (20150603) TryVersion.exe ), we extracted it to C:\MxDrawInstall\, as follows:

Switch the eeclipse workspace and switch the workspace to the control installation location: C:\MxDrawInstall\MxDraw60Android\SRC\MxDraw6.0\samples

Command the following screenshot:

Import the control example as follows:

"File", "Import..."

For example, select, "Existing Android Code into Workspace" Import C:\MxDrawInstall\MxDraw60Android\SRC\MxDraw6.0\ samples\test\proj.android Example

Set up the NDK directory, window="preferences"

Compile the project,"Project", "Bulidall", should be able to compile the project successfully.

To increase the run configuration, click :

The interface settings are as follows:

Click on the "Run" effect as follows:

So far, Android's development environment has been built.

CAD controls: Steps to build an environment for Android

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.