Installing the Android Development Tools Manually

From Appmethod Topics
Jump to: navigation, search

Go Up to Installing the Android Development Tools


Important: This is not the recommended way of installing the Android development tools. See Installing the Android Development Tools.

The installer for Appmethod installs the Android development tools by default. If you opted out in the Appmethod installer, you can also Install the Android development tools using GetIt Package Manager.

If something prevents you from using either of those methods to install the Android development tools, you can alternatively install the Android development tools manually as this page describes.

To install the Android development tools manually:

  1. Install the JDK (Java development kit):
    Note: The installer for Appmethod installs the JDK if you do not have the recommended version of Java (1.6 or 1.7), regardless of whether or not you choose to install the Android development tools.
  2. Install the Android SDK (software development kit):
    1. In your browser on the PC, open the Android SDK download page and click Download the SDK Tools ADT Bundle for Windows.
      • On the Get the Android SDK page, you can select either 32-bit or 64-bit, according to your Windows platform.
      • This download includes the SDK tools and the Eclipse IDE.
        After the download completes, you can safely delete the SDK\android-sdk-windows\eclipse folder, unless you want to use the Eclipse IDE.
    2. From your <SDK> directory, run SDK Manager.exe.
      Tips: If the Android SDK Manager does not start, try these suggestions:
      • Right-click SDK Manager.exe and choose Run As Administrator.
      • Run android.bat from the \tools directory inside your <SDK> directory.
    3. In the Android SDK Manager tree, check (enable) the following nodes:
      • Tools node
      • SDK Platform node within the Android <version> (API <level>) node, where <level> must be 10 or a higher value (for example, "19").
        Note: Appmethod supports Android 2.3 and later versions regardless of which SDK Platform you download. Android SDK platforms are backward compatible.
    4. Click Install <n> packages, click Accept License to accept the required licenses, and click Install to install the required software.
    5. You can close the Android SDK Manager when the installation finishes.
  3. Install the Android NDK (native development kit):

After you install the Android development tools, you must add an Android SDK to Appmethod.

Adding Java as a User Override to Your System Path

If you installed the JDK yourself, Java might not be in your system path. For example, if Java is not in your system path, you must use android.bat to start the Android SDK Manager (instead of SDK Manager.exe). If you want to optimize for Android development, you should add Java to your system path environment variable.

  1. Choose Tools > Options > Environment Options > Environment Variables.
  2. In the System variables pane, double-click the Path item.
  3. In the Override System Variable dialog box, click the Home button on your keyboard to bring the focus to the beginning of the path.
  4. Add the path to Java at the beginning of your system path (it must precede all references to System32).
    For example, the default installed path to java.exe in Appmethod is:
    C:\Program Files\Java\jdk1.7.0_25\bin
    Note that you should only need to add an override if your Java installation is different from this.
    End your path entry with a semicolon (;):
    JustOverride.png
  5. Click OK on the Override dialog box, and click Yes on the Confirm dialog box that follows.
  6. Verify that you see the path to Java shown at the start of the Path field in the User overrides pane:
    PathSysVar.png
  7. Click OK to close the Tools Options Dialog Box.

Handling an Android SDK Manager Issue on Windows 8

On Windows 8, you might see errors when you start the Android SDK Manager. If this happens, you might not be able to download any additional SDKs.

The solution is to edit the android.bat file and change the line that launches the Android SDK Manager. Add -Djava.net.preferIPv4Stack=true to the call to Java, as follows:

call %java_exe% -Djava.net.preferIPv4Stack=true %REMOTE_DEBUG% -Dcom.android.sdkmanager.toolsdir="%tools_dir%" -Dcom.android.sdkmanager.workdir=%work_dir% -classpath "%jar_path%;%swt_path%\swt.jar" com.android.sdkmanager.Main %*

This issue seems to be related to Windows 8 wanting to use Internet Protocol V6.

See Also