Google android sdk linux

Saved searches

Use saved searches to filter your results more quickly

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

Installing Android SDK Tools

Finding these guides helpful?

We need help from the broader community to improve these guides, add new topics and keep the topics up-to-date. See our contribution guidelines here and our topic issues list for great ways to help out.

Check these same guides through our standalone viewer for a better browsing experience and an improved search. Follow us on twitter @codepath for access to more useful Android development resources.

Clone this wiki locally

The Android software development kit (SDK) includes different 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 .java files to .dex files). Platform Tools include the Android debug shell, sqlite3 and Systrace.

The Android SDK 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 different approaches.

Installing the Android SDK (Automated 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 you are using Ubuntu 15.04 or 15.10, 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 have macOS/OS X running, you can use Homebrew to install the Android SDK.

  1. Install Homebrew — the package manager for macOS/OS X
  2. Run the following commands:
brew tap homebrew/cask brew install --cask android-sdk

This will install the Android SDK tools in /usr/local/Cellar/android-sdk/

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 Only section. Copy the URL for the download that’s appropriate for your build machine OS.

List of Android SDK downloads from developers.android.com

Use wget with the correct SDK URL:

$ wget https://dl.google.com/android/repository/tools_r25.2.3-macosx.zip 

Unzip and place the contents within your home directory. The directory names can be anything you like, but save the files in somewhere easy to find (i.e. ~/android-sdk).

$ 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’s time to set your build environment’s PATH variable and other variables that will be use to locate Android.

Edit your .bash_profile file. If you’re not using bash, edit the right config file for your environment.

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

Save and quit. Reload .bash_profile :

At the prompt, type android and hit Enter to launch the Android SDK Manager in a window. If this doesn’t work, your PATH variable has not been set up 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, take a look at the build.gradle file in your project.

Here are the SDK package names you’ll definitely wish to select:

  • Tools > Android SDK Tools
  • Tools > Android SDK Platform-tools
  • Tools > Android SDK Build-tools
  • One version of the Android Platform. E.g., Android 5.1.1 (API 22) . It should be the one you named in the android: compileSdkVersion section of your build.gradle file.

You will also want to download the extras:

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

then make sure 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 list to view all the packages and apply the —filter option for selective installs:

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

If you decide to be selective about which packages to be installed, make sure to include the extra Android Maven repository. Otherwise, you may not be able to use the latest support design library.

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

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

Created by CodePath with much help from the community. Contributed content licensed under cc-wiki with attribution required. You are free to remix and reuse, as long as you attribute and use a similar license.

Источник

How to install Android SDK on Ubuntu?

For my Ubuntu machine, I downloaded the latest version of Android SDK from this page. After extracting the downloaded .tgz file, I was trying to search for installation instructions and found:

To get started on Linux: Unpack the .zip file you’ve downloaded. The SDK files are download separately to a user-specified directory. Make a note of the name and location of the SDK directory on your system—you will need to refer to the SDK directory later when using the SDK tools from the command line.

there’s an easy install paolorotolo.github.io/android-studio — or check this tutorial on how do it manualy — youtube.com/watch?v=qfinKxwYYZs

@Tasos Any idea about the maintenance and long term support paolorotolo’s Android studio? This looks more of a personal project 🙁

Android Studio itself alerts you when there is a new update/upgrade so you do it from there. I dont think the person modified AS

from my last comment — however you can ask that question directly to the person here — github.com/PaoloRotolo/android-studio/issues

9 Answers 9

sudo apt update && sudo apt install android-sdk 

The location of Android SDK on Linux can be any of the following:

  • /home/AccountName/Android/Sdk
  • /usr/lib/android-sdk
  • /Library/Android/sdk/
  • /Users/[USER]/Library/Android/sdk
  • Download the Android Studio.
  • Extract downloaded .zip file. The extracted folder name will read somewhat like android-studio

To keep navigation easy, move this folder to Home directory.

  • After moving, copy the moved folder by right clicking it. This action will place folder’s location to clipboard.
  • Use Ctrl Alt T to open a terminal
  • Go to this folder’s directory using cd /home/(USER NAME)/android-studio/bin/
  • Type this command to make studio.sh executable: chmod +x studio.sh
  • Type ./studio.sh

A pop up will be shown asking for installation settings. In my particular case, it is a fresh install so I’ll go with selecting I do not have a previous version of Studio or I do not want to import my settings.

If you choose to import settings anyway, you may need to close any old project which is opened in order to get a working Android SDK.

From now onwards, setup wizard will guide you.

Android Studio can work with both Open JDK and Oracle’s JDK (recommended). Incase, Open JDK is installed the wizard will recommend installing Oracle Java JDK because some UI and performance issues are reported while using OpenJDK.

The downside with Oracle’s JDK is that it won’t update with the rest of your system like OpenJDK will.

The wizard may also prompt about the input problems with IDEA .

Verify installation settings

An emulator can also be configured as needed.

The wizard will start downloading the necessary SDK tools

The wizard may also show an error about Linux 32 Bit Libraries, which can be solved by using the below command:

sudo apt-get install libc6:i386 libncurses5:i386 libstdc++6:i386 lib32z1

After this, all the required components will be downloaded and installed automatically.

After everything is upto the mark, just click finish

To make a Desktop icon, go to ‘Configure’ and then click ‘Create Desktop Entry’

Источник

How To Install android-sdk-build-tools on Ubuntu

The Android SDK has a number of tools that will assist you in developing mobile applications for the Android platform. The tools are divided into three categories: SDK Tools, Platform Tools, and Build Tools. Build-tools is an Android SDK component necessary for developing Android application code. This package includes the Android SDK Build tool. Android SDK Platform tools are used to include Android SDK Build-tools. They have been isolated from the Android SDK Platform tools, allowing the build tools to be updated independently of the IDE components. The Android SDK Build Tools are precisely what their name implies: tools for developing Android applications. It is vital to use the most recent build tools version although older versions are kept for backward compatibility in case your projects rely on prior versions of the Build Tools.

On Ubuntu 20.04, there are three options for installing android-build-tools. Apt-get, apt, and aptitude are all available. Each strategy of installation will be described in detail in the following sections. You may select any of them.

Method 1: Using the apt-get command

Using the following command, update the apt database using apt-get.

After upgrading the apt database, we can use apt-get to install android-build-tools by performing the following command:

sudo apt-get -y install android-sdk-build-tools

Method 2: Using apt-get

The apt database will be updated using the following command.

After upgrading the apt database, we can use apt to install android-build-tools by performing the following command:

sudo apt -y install android-sdk-build-tools

Method 3: Using aptitude

If you want to use this method, you may need to install aptitude first because it is not normally installed by default on Ubuntu. Use the following command to update the apt database with aptitude.

After upgrading the apt database, we can use aptitude to install android-build-tools by performing the following command:

sudo aptitude -y install android-sdk-build-tools

Источник

Читайте также:  List profiles in linux
Оцените статью
Adblock
detector