banner



Android Studio How To Install Sdk

The Android software development kit (SDK) includes dissimilar components, including SDK Tools, Build Tools, and Platform Tools. The SDK Tools primarily includes the stock Android emulator, hierarchy viewer, SDK manager, and ProGuard. The Build Tools primarily include aapt (Android packaging tool to create .APK), dx (Android tool that converts .coffee files to .dex files). Platform Tools include the Android debug shell, sqlite3 and Systrace.

The Android SDK tin can be installed automatically using the latest version of Gradle or downloading the Android SDK manually in several different ways. Below is an overview of all unlike approaches.

Installing the Android SDK (Automatic Way)

Gradle 2.2.0 now supports downloading automatically dependencies. Make sure to upgrade to the latest Gradle version. The Gradle plugin to manage dependencies is now deprecated.

Installing for Ubuntu Linux

If y'all are using Ubuntu 15.04 or fifteen.ten, make sure to install the following packages. Otherwise, you may notice No such file or directory when running trying to execute the aapt program that is part of the Android SDK toolset:

sudo apt-get install libc6-dev-i386 lib32z1 openjdk-8-jdk

Installing the Android SDK (via Homebrew)

Assuming you take macOS/Bone X running, you can use Homebrew to install the Android SDK.

  1. Install Homebrew - the packet managing director for macOS/Os X
  2. Run the post-obit commands:
    brew tap homebrew/cask mash install --cask android-sdk

This volition install the Android SDK tools in /usr/local/Cellar/android-sdk/<version number>

Installing the Android SDK (Manual Way)

You will need to download the Android SDK without Android Studio bundled. Go to Android SDK and navigate to the SDK Tools But section. Copy the URL for the download that'southward advisable for your build auto OS.

List of Android SDK downloads from developers.android.com

Utilise wget with the correct SDK URL:

            $ wget https://dl.google.com/android/repository/tools_r25.two.3-macosx.zilch                      

Unzip and place the contents within your home directory. The directory names can be annihilation yous similar, simply relieve the files in somewhere easy to find (i.e. ~/android-sdk).

Run the sdkmanager tool:

            $ tools/bin/sdkmanager --update $ tools/bin/sdkmanager "platforms;android-25" "build-tools;25.0.2" "extras;google;m2repository" "extras;android;m2repository" $ tools/bin/sdkmanager --licenses                      

Directory structure on the build server

Now it'southward time to set your build environs's PATH variable and other variables that volition be use to locate Android.

Edit your .bash_profile file. If you're non using bash, edit the correct config file for your environs.

                          #              Android                        export            ANDROID_SDK_ROOT=/Users/ciandroid/android-sdk-macosx            export            PATH=$PATH:$ANDROID_SDK_ROOT/tools

Save and quit. Reload .bash_profile:

Installing via the GUI

At the prompt, type android and hit Enter to launch the Android SDK Manager in a window. If this doesn't piece of work, your PATH variable has not been ready with the Android SDK location.

Android SDK manager on build machine

You will want to install the same Android SDK packages on your build machine as you did to get Gradle running locally. Before you begin, accept a look at the build.gradle file in your project.

Packages to install

Here are the SDK package names y'all'll definitely wish to select:

  • Tools > Android SDK Tools
  • Tools > Android SDK Platform-tools
  • Tools > Android SDK Build-tools
  • I version of the Android Platform. E.g., Android five.1.one (API 22). It should exist the one y'all named in the android: compileSdkVersion section of your build.gradle file.

Yous will besides desire to download the extras:

  • Android Back up Repository
  • Android Support Library

Note: Cull the Android SDK Build-tools for the version of Android that you listed in the build.gradle file every bit the android: buildToolsVersion target. If your build.gradle says

            android            {     buildToolsVersion                          '21'                        ... }

then make certain to download that API version in the Android SDK Manager.

Installing via the Command Line

You can also download the SDK packages using the command line with the --no-ui parameter.

android update sdk --no-ui --all

If you want to be selective about installing, you can use android listing to view all the packages and apply the --filter choice for selective installs:

sudo android update sdk --no-ui --filter platform-tools,tools

If yous make up one's mind to be selective about which packages to exist installed, make certain to include the extra Android Maven repository. Otherwise, you may not exist able to use the latest support design library.

android update sdk --no-ui --all --filter actress-android-m2repository          

At that place is currently no filter to install the build tools directly. See this ticket for more information.

Source: https://github.com/codepath/android_guides/wiki/Installing-Android-SDK-Tools

Posted by: boundshintrues.blogspot.com

0 Response to "Android Studio How To Install Sdk"

Post a Comment

Iklan Atas Artikel

Iklan Tengah Artikel 1

Iklan Tengah Artikel 2

Iklan Bawah Artikel