Android development prerequisites
- You need to install the Java Development Kit (JDK) to write Java (and Android) programs.
Because Android is a Java-based programming language, we need to have a Java JDK on top of our operating system.
Do not install the Java Runtime Environment (JRE). JDK and JRE different!
- We can download your operating system’s JDK at http://java.oracle.com
- Or, for OS X, Linux:
Enter javac at the command line
Install Java when prompted
At the command line, type sudo apt-get install default-jdk
Other Releases: Consult your distributor’s documentation
- After installing the JDK, download the Android SDK from https://developer.android.com/
- The easiest way to download and install the Android Studio package for your operating system (including the Android SDK)
Download / install Android development tools (Eclipse-based) from this site
Install the Android SDK tools yourself, then install ADT separately (from this site)
- We’ll use the Android Studio (easy)
Android Studio installation is not very complex, just a few clicks.
After the Android Studio download is complete, verify your JDK version: Open the command line and type javac -version. If the JDK is not accessible or the version is less than 1.8.
To install Android Studio on Windows, follow these steps:
- Start the .exefile that you downloaded.
- Follow the setup wizard to install Android Studio and any necessary SDK tools.
On some Windows systems, the launcher script does not capture where the JDK is installed. If you encounter this problem, you need to set a variable that represents the correct location.
Select Start> Computer> System Properties> Advanced System Properties. Then open the Advanced tab> Environment Variables and add a new system variable JAVA_HOME pointing to your JDK folder, for example C: \ Program Files \ Java \ jdk1.8.0_77.