Android build tool path

How To Install Android SDK Tools On Ubuntu 20.04

It provides all the steps required to install Android SDK Tools on Ubuntu 20.04 LTS.

In this tutorial, we will discuss all the steps required to install Android SDK Tools, SDK Manager, and AVD Manager on the popular Linux distribution i.e. Ubuntu 20.04 with Java 16. This tutorial provides the steps to install Android SDK Tools on Ubuntu 20.04 LTS, though the steps should be the same for other versions of Ubuntu and Linux systems.

This post is useful for the developers using Android SDK Tools with other IDEs without installing Android Studio for the use cases including hybrid app development using Ionic. It also assumes that a valid JAVA_HOME environment variable exists pointing to the installation directory of Java. You may follow the Java installation tutorials written by us including How To Install Java 8 On Ubuntu, How To Install Java 16 On Ubuntu 20.04 LTS, and How To Install OpenJDK 16 On Ubuntu 20.04 LTS.

In case you are interested in developing Android applications using Android Studio, you can also follow the other tutorials written by us including How To Install Android SDK Tools On Windows, How To Install Android Studio On Windows, and How To Install Android Studio On Ubuntu 20.04.

You may also be required to execute the below-mentioned command in case you have set the options previously for Java 9 or Java 10.

Notes: The Ubuntu 18.04 LTS version of this tutorial is available at — How To Install Android SDK Tools On Ubuntu 18.04. You can continue this tutorial for Ubuntu 20.04 LTS.

Download SDK Tools

Open the download tab of Android Studio and scroll down to the Command line tools only section. This section shows various options to download the SDK tools as shown in Fig 1.

Click on the Download Link as highlighted in Fig 1. It will ask to accept the Terms and Conditions as shown in Fig 2.

Go through the details, agree to the terms and conditions, and click the Download Button to start the download.

Install SDK Tools

In this step, we will install the Android SDK Tools on Ubuntu. Create a directory having the name set to android-sdk and extract the content of the downloaded SDK Tools zip to this directory. Create another directory android-sdk/cmdline-tools to store the sdk-tools. Make sure that the tools directory is available directly within the android-sdk/cmdline-tools directory created by us.

Download and Install Platform Tools

In this step, we will install the Android Platform Tools on Ubuntu. Follow the same steps similar to Android SDK Tools as shown in Fig 4, Fig 5, and Fig 6 to install Android Platform Tools using the download link.

Make sure that the platform-tools content is available within the directory platform-tools. The directory structure should be similar to:

Configure Environment Variable

In this step, we will configure the environment variable to use the SDK tools installed by us. There are two ways to do it. In the first approach, we can update the .bashrc file of the user account. Another approach is to update /etc/profile file which works for all the accounts.

Читайте также:  Как сбросит андроид через биос
Approach A

Update .bashrc file of the user account.

Notes: Replace the android sdk path based on your installation directory.

Approach B

Update /etc/profile file.

Scroll down by pressing the Page Down button and add at the end of this file:

Make sure that you provide the correct path to the android-sdk directory.

Now press Ctrl + O and press Enter to write our change. Press Ctrl + X to exit the nano editor. The nano editor should look like Fig 7.

Notes: Approach B didn’t work for me.

Now test the Android SDK installed by us using the environment variables configured by us.

Using the SDK Manager

Update SDK Manager — Update the SDK manager using the below-mentioned command.

List — We can list the installed and available packages and images using the list command as shown below.

Install Platform — Use the below-mentioned command to install the Android 10 (API level 29) using the SDK manager.

It will ask to accept the terms and conditions. Enter y and hit Enter Key to accept the terms and conditions. This command creates the directories licenses and platforms within android-sdk and installs the package android-30 within the platforms directory having all the required files to run the emulator for Android 11.

If we again check the installed packages, the list command shows the installed options as shown below.

After installing the platforms, the directory structure should be:

Add System Image — We can add system image from available images shown by the list command using the SDK manager as shown below. We are adding the most recent default 64-bit system image.

Accept the License Agreement to complete the download. There are several projects which need Google Play Services. We need system images specific to Google Play Services as shown below.

Now again use the command list as shown below.

After installing the default system image, the directory structure should be:

Install Emulator — You might be required to install the emulator before creating the AVD using SDK Manager. The emulator gets installed while adding the system images in the previous steps.

Install Build Tools — Install the most recent build tool listed by the list command.

After installing the build tools, the directory structure should be:

Now again use the command list as shown below.

Using the Emulator and AVD Manager

Create AVD — Create the AVD using the system image downloaded in the previous step as shown below. Replace with actual name.

The above commands ask a bunch of questions to configure the AVD if we choose the custom hardware profile option. We have excluded the details of these options from this tutorial since these configuration details depend on the actual needs. After completing all the configurations, it creates the AVD using the name provided by us while configuring it.

List AVDs — Now go to the tools directory(only required in case you have omitted to add tools path to PATH while configuring environment variables) on the command line and check the installed platform as shown below.

It will list all the AVDs installed by us.

Launch AVD — We can launch the AVD using the emulator as shown below.

The emulator will take some time to completely launch the AVD. The final results should look similar to Fig 8.

Notes: I have used Ubuntu 20.04 LTS installed as VM using VMware Workstation Player, hence I have enabled the Virtualization for my Virtual Machine.

Delete Emulator — We can also delete an existing emulator as shown below.

Summary

This tutorial provided all the steps required to install Android SDK Tools and Android Platform Tools on Ubuntu 20.04 LTS. It also provided the steps required to launch the AVD using the Android Emulator.

Читайте также:  Panda cms для андроид

Источник

Installing Android SDK Tools

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.

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.

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:

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:

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

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.

Use wget with the correct SDK URL:

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.

Run the sdkmanager tool:

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.

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.

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:

  • Android Support Repository
  • Android Support Library

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.

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

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:

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.

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

Источник

No installed build tools found. Install the Android build tools version 19.1.0 or higher. #13120

Comments

oceankai commented Oct 12, 2017 •

on my Mac,ionic build android

  • What went wrong:
    A problem occurred evaluating root project ‘android’.

No installed build tools found. Install the Android build tools version 19.1.0 or higher.

but i had install build tools? How to fix it?

Читайте также:  Как убрать все значки с экрана андроид

The text was updated successfully, but these errors were encountered:

kensodemann commented Oct 12, 2017

Hello! Thank you for opening an issue with us!

The Ionic Framework issues list is designated for the reporting of bugs with the Ionic Framework or for requesting new features. As this seems like more of a support question I am going to close this issue.

I urge that you ask this question on our forum or on our slack channel.

Thanks for using Ionic!

GNORRA commented Apr 4, 2018

I also have the same problem with my project.
SOMEBODY HELP ME PLEASE

lkrubner commented Apr 12, 2018

I’ve the same issue.

jfbourne commented Apr 14, 2018

    Install Android Studio (NOTE: Chose SDK location to your root dir

/Android)
Add the path to your

/.bash_profile:
export ANDROID_HOME=/Android/sdk export PATH=$ANDROID_HOME/platform-tools:$PATH export PATH=$ANDROID_HOME/tools:$PATH

  • Quit your terminal and start again
  • Other things you might need in your bash_profile

    export PATH=»/Library/Frameworks/Python.framework/Versions/3.6/bin:$» export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.8.0_161.jdk/Contents/Home

    Welquer commented May 10, 2018

    That’s awesome! Thank you @jfbourne, it worked for me!

    marusker commented May 16, 2018 •

    I struggled with this problem for hours, and finally fixed it.

    Please launch android studio. Then go to Preferences -> Appearance & Behavior -> System SEttings -> Android SDK. You will find «Android SDK Location».
    In my PC, it’s «/Users/$/Library/Android/sdk».

    Go to «SDK tools» tab and check «show package details». » Android SDK build tools » will be there. Please make sure Android SDK build tools 19.1.0 or higher is installed.

    Edit .bash_profile, and set ANDROID_HOME as «Android SDK Location» which you found in the Android Studio.
    In my case,
    ANDROID_HOME= /Users/$/Library/Android/sdk
    export PATH=$:$ANDROID_HOME/tools:$ANDROID_HOME/platform-tools

    luisameglio commented May 18, 2018

    nizardinho commented Jun 22, 2018

    @marusker come on. you’re the best

    jdmallen commented Jul 20, 2018

    Git Bash also respects the Windows system environment variables (System control panel -> Advanced system settings -> Environment Variables. ). You can (and should) add ANDROID_HOME there. If you’re the only user or ANDROID_HOME is not in your user folder, put it under system; otherwise, put it under user. Between the .bashrc edits and this, you really only need to do one or the other, but doing both won’t hurt anything.

    You can add those additional system path entries by adding %ANDROID_HOME%\tools and %ANDROID_HOME%\platform-tools to the list in Windows 10, or appending ;%ANDROID_HOME%\tools;%ANDROID_HOME%\platform-tools to the Path in older Windows versions.

    You can test this by typing echo $ from Git Bash, or echo %ANDROID_HOME% from command line.

    Jerige commented Jul 23, 2018 •

    I had the same issue. Setting a system environment variable ANDROID_HOME to the proper location C:\Users\. \AppData\Local\Android\android-sdk fixed the issue.
    Additional info: In that folder, you should have ‘platforms’ subfolder and there are downloads for Android SDK, for instance: folder ‘android-24’ is for API 24 (Android 7.0). If you are missing API you would like to use for build download additional API with SDK manager.

    ionitron-bot bot commented Sep 1, 2018

    Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out.

    You can’t perform that action at this time.

    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.

    Источник

    Оцените статью