How to Install Android SDK in Windowsby David Wayne
The Android Developers website offers three ways to install the Android system development kit in Windows 8.1, packaging the necessary binary and library files in ZIP archives so that you need to only unzip them and choose an installation location. The most complete, stable solution is to install the Eclipse bundle with Android developer tools, but an alternative integrated development environment called Android Studio, currently in the testing phase, offers experimental, advanced features for using Google Cloud Platform and other Google services.
Install the Latest Java Development Kit
All Android apps run in a version of the Java Virtual Machine called the Dalvik Virtual Machine, designed to work efficiently with the Linux kernel at Android's core. You can't open Eclipse or use the Android SDK without the JDK installed in your Windows' system path, although installing the standalone Android SDK automatically downloads and installs the latest JDK. The path environment variable is a global setting that includes a list of directories from which Windows can launch executable files; it's not part of the Android SDK or Java but of Windows. Download the JDK from Java and run the installer to add the JDK to your system path (link in Resources).
Download a Development Bundle
The easiest way to prepare your computer for Android development is to download a complete development package, including the IDE of your choice and the Android SDK. The Eclipse IDE is a more mature project than Android Studio, and more documentation and online support is available for Eclipse, especially for new developers. After downloading the Eclipse ADT bundle from Android Developers, extract it to your C: drive to avoid errors due to overly long file path names during extraction. Open the Eclipse folder, right-click “Eclipse” and choose “Pin to Start,” “Pin to Taskbar” or both, to add shortcuts to your desktop or Start screen.
Install the Android SDK Separately From Eclipse
For an existing Eclipse installation, download the ADT plugin using the Install New Software interface. Open Eclipse, click “Help” and choose “Install New Software.” Click “Add” to open the Add Repository window. Enter “ADT Plugin” (without quotes, here and throughout) in the Name field and “https://dl-ssl.google.com/android/eclipse/” in the Location field. Cick “OK.” Select “Developer Tools” and click “Next” to finish installing the plugin. Alternatively, install the standalone SDK by downloading it from the Android Developers website and then running the installer, which adds the necessary files to your system path. The standalone SDK provides all the Android development tools available for Eclipse but as a set of command-line programs.
Debug Android Apps on a Hardware Device
The Android SDK provides all the tools for developing apps and testing them in an emulator, but debugging apps in a virtual device doesn't sufficiently prepare them for end users. To produce stable apps, test them on as many different Android devices and Android versions as possible. To test apps on an Android device over USB, turn on USB Debugging in the Developer section of Settings. For Android 4.2 and later, reveal the hidden Developer menu by selecting “About Phone” and tapping “Build Number” seven times. In Windows, you also must install the Android Debug Bridge driver for your device; refer to the OEM Drivers table on the Android Developers website for your device's driver (link in Resources). With your device connected to your computer over USB, click “Debug” or “Run” in Eclipse and then select your device to install and run the current project on it.
- photo_camera Dangubic/iStock/Getty Images