How to build and install an SDK for Android

Revision as of 16:20, 22 August 2019 by Registered User (Jean Christophe Trotin moved page How to build and install an SDK to How to build and install an SDK for Android without leaving a redirect: Request to add Android name in each How To concerned)

This article explain how to integrate the custom Android SDK for Android Studio.

1. Prerequisites[edit source]

You must have installed one of the following environment:

Android Studio must be installed.

Information about Android API Levels is explained in the Android SDK page[1].

For Developer Package users only the section Install SDK in Android Studio is required.

2. Build SDK for distribution[edit source]

2.1. Set environment[edit source]

The Android SDK has to be generated in the eng build environment, so you must select the right case using the lunch command.

2.2. SDK for Linux[edit source]

Execute the following build command to generate the SDK

 make update-api
 make sdk

The result is in path out/host/linux-x86/sdk/<BoardId>/android-sdk_eng.<login>_<linux-x86>/platforms/android-<Version>/android.jar.

2.3. SDK for Windows[edit source]

A specific Ubuntu package needs to be installed for Windows Android SDK building, to add the unix2dos command:

 sudo apt-get install tofrodos

Execute the following build command to generate the SDK:

 make update-api
 make win_sdk

The result is in path out/host/windows/sdk/<BoardId>/android-sdk_eng.<login>_<windows>/platforms/android-<Version>/android.jar.

Info white.png Information
both Linux and Windows SDKs are generated when win_sdk is used.

3. Install SDK in Android Studio[edit source]

The information below applies to both Linux Ubuntu and Windows environments. (It is assumed that Android Studio is already installed.)

  • Open Android Studio
  • Open the Settings item in the File Menu
  • In Appearance & Behavior --> System Settings --> Android SDK
    • Check the path of the SDK as highlighted in Red in the picture below.
    • Check for the current SDK API selected, as highlighted in Template:DarkBlue in the picture below.

Android SDK.png

  • Copy the android.jar file provided with the developper package or the one you generate with the distribution to the Android Studio SDK path : <YourAndroidStudio_SDKPath>/platforms/android-<APILevel>/
  • Restart Android Studio
  • To check for new API availability in Android Studio, you can search for new Class/Symbol through the Navigate menu.

4. References[edit source]


Renaming.png This page is a candidate for renaming (move).
The requested new name is: How to build and install an SDK for Android .
The supplied reason is: request to add Android name in each How To concerned .
-- N. Louboutin.
Wiki maintainers: remember to update the pages that link this page before renaming (moving) it.