1. Windows:
The development environment under Windows requires the following software to be installed:
Java JDK
Apache ANT Build System
Android SDK
Cygwin
Android NDK
Eclipse IDE
1. Install Java JDK
/technetwork/java/javase/downloads/
Configure environment variables:
Create a new JAVA_HOME key and set the value to the installation directory of JDK.
Turn on the PATH key and add it at the end
;%JAVA_HOME%\bin
Testing:
javac -version
2. Install Apache ANT Build System
Download and install:
/
Set environment variables:
Add the ANT_HOME key, the value is the installation directory of Apache ANT.
Add at the end of PATH: ;%ANT_HOME%\bin
Testing:
ant -version
3. Install Android SDK and eclipse
/sdk/
Set environment variables:
New
ANDROID_SDK_HOME key, the value is the installation directory of the Android SDK.
Add at the end of PATH:
;%ANDROID_SDK_HOME% (the root directory of SDK)
;%ANDROID_SDK_HOME%\tools (the tool that contains SDKs that are unrelated to the platform)
tools;%ANDROID_SDK_HOME%\platform-tools (the directory related to the platform)
4. Install Cygwin:
Android NDK tools are some UNIX-Like commands, and some NDK components are shell scripts. Cygwin is a UNIX-Like environment under Windows.
Download and install:
/
1. Select "Install From Internet"
2. Search for "make", find GNU Make and select
3. Set environment variables:
Added the CYGWIN_HOME key, the installation directory with the value Cygwin, and it will be increased at the end of Path; %CYGWIN_HOME%\bin
5. Install Android NDK
/tools/sdk/ndk/
Set environment variables:
New
ANDROID_NDK_HOME key value is the Android NDK installation directory, which is increased at the end of PATH; %ANDROID_NDK_HOME%
6. Install Eclipse
/downloads/
7. Install Android ADT:
Click Help->Install New Software, Name to enter Android ADT, Location to enter /android/eclipse/,
Select All and install.
2. MAC OS X
Need to install some software
Xcode
Java JDK
Apache ANT Build System
GNU Make
Android SDK
Android NDK
Eclipse IDE
1. Install XCode
/xcode/
2. Make sure that JDK, ANT and GNU are installed
javac -version
ant -version
make -version
3. Download and install Android SDK
/sdk/
Set environment variables:
echo export ANDROID_SDK_HOME=/android/android-sdk-macosx > >~/.bash_profile
echo export PATH = \$ANDROID_SDK_HOME/tools:\$ANDROID_SDK_HOME/platformtools:\$PATH > > ~/.bash_profile
4. Download and install Android NDK
/tools/sdk/ndk/
Set environment variables
echo export ANDROID_NDK_HOME=/android/android-ndk-r8 > > ~/.bash_profile
echo export PATH = \$ANDROID_NDK_HOME:\$PATH > > ~/.bash_profile
5. Install Eclipse
The development environment under Windows requires the following software to be installed:
Java JDK
Apache ANT Build System
Android SDK
Cygwin
Android NDK
Eclipse IDE
1. Install Java JDK
/technetwork/java/javase/downloads/
Configure environment variables:
Create a new JAVA_HOME key and set the value to the installation directory of JDK.
Turn on the PATH key and add it at the end
;%JAVA_HOME%\bin
Testing:
javac -version
2. Install Apache ANT Build System
Download and install:
/
Set environment variables:
Add the ANT_HOME key, the value is the installation directory of Apache ANT.
Add at the end of PATH: ;%ANT_HOME%\bin
Testing:
ant -version
3. Install Android SDK and eclipse
/sdk/
Set environment variables:
New
ANDROID_SDK_HOME key, the value is the installation directory of the Android SDK.
Add at the end of PATH:
;%ANDROID_SDK_HOME% (the root directory of SDK)
;%ANDROID_SDK_HOME%\tools (the tool that contains SDKs that are unrelated to the platform)
tools;%ANDROID_SDK_HOME%\platform-tools (the directory related to the platform)
4. Install Cygwin:
Android NDK tools are some UNIX-Like commands, and some NDK components are shell scripts. Cygwin is a UNIX-Like environment under Windows.
Download and install:
/
1. Select "Install From Internet"
2. Search for "make", find GNU Make and select
3. Set environment variables:
Added the CYGWIN_HOME key, the installation directory with the value Cygwin, and it will be increased at the end of Path; %CYGWIN_HOME%\bin
5. Install Android NDK
/tools/sdk/ndk/
Set environment variables:
New
ANDROID_NDK_HOME key value is the Android NDK installation directory, which is increased at the end of PATH; %ANDROID_NDK_HOME%
6. Install Eclipse
/downloads/
7. Install Android ADT:
Click Help->Install New Software, Name to enter Android ADT, Location to enter /android/eclipse/,
Select All and install.
2. MAC OS X
Need to install some software
Xcode
Java JDK
Apache ANT Build System
GNU Make
Android SDK
Android NDK
Eclipse IDE
1. Install XCode
/xcode/
2. Make sure that JDK, ANT and GNU are installed
javac -version
ant -version
make -version
3. Download and install Android SDK
/sdk/
Set environment variables:
echo export ANDROID_SDK_HOME=/android/android-sdk-macosx > >~/.bash_profile
echo export PATH = \$ANDROID_SDK_HOME/tools:\$ANDROID_SDK_HOME/platformtools:\$PATH > > ~/.bash_profile
4. Download and install Android NDK
/tools/sdk/ndk/
Set environment variables
echo export ANDROID_NDK_HOME=/android/android-ndk-r8 > > ~/.bash_profile
echo export PATH = \$ANDROID_NDK_HOME:\$PATH > > ~/.bash_profile
5. Install Eclipse