Android Build Tools Download Mac
- Android Build Tools Download Mac Download
- Android Build Tools Archive Download
- Install Android Build Tools
Mac OS X 10.10 (Yosemite) or higher, up to 10.13 (High Sierra). (927 MB) for me to download. Android SDK command-line tools. Now you’re ready to build your Android application.
Google is committed to advancing racial equity for Black communities. See how.
Note: These requirements apply only to building older versions of Android. For the Android Open Source Project (AOSP) master
branch, see the standard Requirements and Establishing a Build Environment.
Building recent old releases (>= 5.0 Lollipop)
For Android versions 8.0 (Oreo or O) — 5.0 (Lollipop or L), consider using the included Dockerfile to ease the installation of all required packages.
Building really old releases (<= 4.4 KitKat)
Operating systems
Android is typically built with a GNU/Linux or Mac OS X operating system. It’s also possible to build Android in a virtual machine on unsupported systems such as Windows.
We recommend building on GNU/Linux. The Android build system normally runs ART on the build machine to precompile system DEX files. ART can run only on Linux, so the build system skips this precompilation step on non-Linux operating systems, resulting in an Android build with reduced performance.
GNU/Linux
- Android 6.0 (Marshmallow) — AOSP master: Ubuntu 14.04 (Trusty)
- Android 2.3.x (Gingerbread) — Android 5.x (Lollipop): Ubuntu 12.04 (Precise)
- Android 1.5 (Cupcake) — Android 2.2.x (Froyo): Ubuntu 10.04 (Lucid)
Mac OS X (Intel/x86)
- Android 6.0 (Marshmallow) — AOSP master: Mac OS X v10.10 (Yosemite) or higher with Xcode 4.5.2 and Command Line Tools
- Android 5.x (Lollipop): Mac OS X v10.8 (Mountain Lion) with Xcode 4.5.2 and Command Line Tools
- Android 4.1.x (Jelly Bean) — Android 4.4.x (KitKat): Mac OS X v10.6 (Snow Leopard) or Mac OS X v10.7 (Lion) and Xcode 4.2 (Apple Developer Tools)
- Android 1.5 (Cupcake) — Android 4.0.x (Ice Cream Sandwich): Mac OS X v10.5 (Leopard) or Mac OS X v10.6 (Snow Leopard) and the Mac OS X v10.5 SDK
GNU make
For versions lower than the AOSP master branch through Android 4.1.x (Jelly Bean), use GNU make (gmake) 3.82. For Android 4.0.x (Ice Cream Sandwich) and lower, revert from gmake 3.82 to avoid build errors.
Xcode and other packages
For lower versions of Mac OS X v10.8 or lower, install Xcode from the Apple developer site. If you are not already registered as an Apple developer, you must create an Apple ID to download.
If using Mac OS X v10.4, also install Bison:
Android Build Tools Download Mac Download
For MacPorts, issue:
For Homebrew, issue:
Reverting from gmake 3.82
In Android 4.0.x (Ice Cream Sandwich) and lower, gmake 3.82 has a bug that prevents Android from building. You can install version 3.81 using MacPorts with these steps:
- Edit
/opt/local/etc/macports/sources.conf
and add this line: above the rsync line. Then create this directory: - In the new
dports
directory, run: - Create a port index for your new local repository:
- Install the old version of gmake:
JDK
Supported versions
- Android 7.0 (Nougat) — Android 8.0 (Oreo):
- Ubuntu: OpenJDK 8
- Mac OS X: JDK 8u45 or higher
- Android 5.x (Lollipop) — Android 6.0 (Marshmallow):
- Ubuntu: OpenJDK 7
- Mac OS X: jdk-7u71-macosx-x64.dmg
- Android 2.3.x (Gingerbread) — Android 4.4.x (KitKat):
- Ubuntu: Java JDK 6
- Mac OS X: Java JDK 6
- Android 1.5 (Cupcake) — Android 2.2.x (Froyo):
- Ubuntu: Java JDK 5
JDK for Linux
The master
branch of Android in the Android Open Source Project (AOSP) comes with prebuilt versions of OpenJDK below prebuilts/jdk/
so no additional installation is required.
Lower versions of Android require a separate installation of the JDK. On Ubuntu, use OpenJDK.
For Ubuntu 15.04 and higher
Run the following:
For Ubuntu LTS 14.04
There are no available supported OpenJDK 8 packages for Ubuntu 14.04. The Ubuntu 15.04 OpenJDK 8 packages have been used successfully with Ubuntu 14.04. Higher package versions (for example, those for 15.10, 16.04) don’t work on 14.04 using the instructions below.
- Download the
.deb
packages for 64-bit architecture from old-releases.ubuntu.com:
- openjdk-8-jre-headless_8u45-b14–1_amd64.deb with SHA256
0f5aba8db39088283b51e00054813063173a4d8809f70033976f83e214ab56c0
- openjdk-8-jre_8u45-b14–1_amd64.deb with SHA256
9ef76c4562d39432b69baf6c18f199707c5c56a5b4566847df908b7d74e15849
- openjdk-8-jdk_8u45-b14–1_amd64.deb with SHA256
6e47215cf6205aa829e6a0a64985075bd29d1f428a4006a80c9db371c2fc3c4c
- Optionally, confirm the checksums of the downloaded files against the SHA256 string listed with each package above. For example, with the
sha256sum
tool: - Install the packages: Run
dpkg
for each of the.deb
files you downloaded. It may produce errors due to missing dependencies: To fix missing dependencies:
(Optional) Update the default Java version
Optionally, for the Ubuntu versions above, update the default Java version by running:
Note: During a build, if you encounter version errors for Java, see Wrong Java version for likely causes and solutions. →
Visual Studio includes an Android SDK Manager that you useto download Android SDK tools, platforms, and other components that youneed for developing Xamarin.Android apps.
Overview
This guide explains how to use the Xamarin Android SDK Manager inVisual Studio and Visual Studio for Mac.
Note
This guide applies to Visual Studio 2019, Visual Studio 2017, and Visual Studio for Mac.
The Xamarin Android SDK Manager (installed as part of the Mobiledevelopment with .NET workload) helps you download the latest Androidcomponents that you need for developing your Xamarin.Android app. Itreplaces Google’s standalone SDK Manager, which has been deprecated.
Requirements
Android Build Tools Archive Download
To use the Xamarin Android SDK Manager, you will need the following:
- Visual Studio 2019 Community, Professional, or Enterprise.
- OR Visual Studio 2017 (Community, Professional, or Enterprise edition). VisualStudio 2017 version 15.7 or later is required.
- Visual Studio Tools for Xamarin version 4.10.0 or later(installed as part of the Mobile development with .NET workload).
The Xamarin Android SDK Manager also requires the Java Development Kit(which is automatically installed with Xamarin.Android). There areseveral JDK alternatives to choose from:
- By default, Xamarin.Android usesJDK 8,which is required if you are developing for API level 24 or greater(JDK 8 also supports API levels earlier than 24).
- You can continue to use JDK 7if you are developing specifically for API level 23 or earlier.
- If you are using Visual Studio 15.8 Preview 5 or later, you can tryusing Microsoft’s Mobile OpenJDK Distributionrather than JDK 8.
SDK Manager
To start the SDK Manager in Visual Studio, click Tools > Android >Android SDK Manager:
The Android SDK Manager opens in the Android SDKs andTools screen. This screen has two tabs — Platforms andTools:
The Android SDKs and Tools screen is described in more detail inthe following sections.
Android SDK location
The Android SDK location is configured at the top of the Android SDKsand Tools screen, as seen in the previous screenshot. This location mustbe configured correctly before the Platforms and Tools tabswill function properly. You may need to set the location of the AndroidSDK for one or more of the following reasons:
- The Android SDK Manager was unable to locate the Android SDK.
- You have installed the Android SDK in a alternate (non-default) location.
To set the location of the Android SDK, click the ellipsis (…)button to the far right of Android SDK Location. This opens theBrowse For Folder dialog to use for navigating to the location ofthe Android SDK. In the following screenshot, the Android SDK underProgram Files (x86)Android is being selected:
When you click OK, the SDK Manager will manage the Android SDK thatis installed at the selected location.
Tools tab
The Tools tab displays a list of tools and extras. Use this tabto install the Android SDK tools, platform tools, and build tools.Also, you can install the Android Emulator, the low-level debugger(LLDB), the NDK, HAXM acceleration, and Google Play libraries.
For example, to download the Google Android Emulator package, click thecheck mark next to Android Emulator and click the Apply Changesbutton:
A dialog may be shown with the message, The following package requiresthat you accept its license terms before installing:
Click Accept if you accept the Terms and Conditions. At the bottomof the window, a progress bar indicates download and installationprogress. After the installation completes, the Tools tab will showthat the selected tools and extras were installed.
Platforms tab
The Platforms tab displays a list of platform SDK versions alongwith other resources (like system images) for each platform:
This screen lists the Android version (such as Android 8.0), thecode name (Oreo), the API level (such as 26), and the sizes ofthe components for that platform (such as 1 GB). You use thePlatforms tab to install components for the Android API level thatyou want to target. For more information about Android versions and APIlevels, seeUnderstanding Android API Levels.
When all components of a platform are installed, a checkmark appears nextto the platform name. If not all components of a platform areinstalled, the box for that platform is filled.You can expand a platform to see its components (and which componentsare installed) by clicking the + box to the left of the platform.Click — to unexpand the component listing for a platform.
To add another platform to the SDK, click the box next to the platformuntil the checkmark appears to install all of its components, thenclick Apply Changes:
To install only specific components, click the box next to the platformonce. You can then select any individual components that you need:
Notice that the number of components to install appears next to theApply Changes button. After you click the Apply Changes button,you will see the License Acceptance screen as shown earlier.Click Accept if you accept the Terms and Conditions. You may seethis dialog more than one time when there are multiple components toinstall. At the bottom of the window, a progress bar will indicatedownload and installation progress. When the download and installationprocess completes (this can take many minutes, depending on how manycomponents need to be downloaded), the added components are marked witha checkmark and listed as Installed.
Repository selection
By default, the Android SDK Manager downloads platform components andtools from a Microsoft-managed repository. If you need access toexperimental alpha/beta platforms and tools that are not yet availablein the Microsoft repository, you can switch the SDK Manager to useGoogle’s repository. To make this switch, click the gear icon in thelower right-hand corner and select Repository > Google(Unsupported):
When the Google repository is selected, additional packages may appearin the Platforms tab that were not available previously. (In theabove screenshot, Android SDK Platform 28 was added by switching tothe Google repository.) Keep in mind that use of the Google repositoryis unsupported and is therefore not recommended for everydaydevelopment.
To switch back to the supported repository of platforms and tools,click Microsoft (Recommended). This restores the list of packagesand tools to the default selection.
Requirements
To use the Xamarin Android SDK Manager, you will need the following:
- Visual Studio for Mac 7.5 (or later).
The Xamarin Android SDK Manager also requires the Java Development Kit(which is automatically installed with Xamarin.Android). There areseveral JDK alternatives to choose from:
- By default, Xamarin.Android usesJDK 8,which is required if you are developing for API level 24 or greater(JDK 8 also supports API levels earlier than 24).
- You can continue to use JDK 7if you are developing specifically for API level 23 or earlier.
- If you are using Visual Studio for Mac 7.7 or later, you can tryusing Microsoft’s Mobile OpenJDK Distributionrather than JDK 8.
Important
Xamarin.Android does not support JDK 9.
SDK Manager
To start the SDK Manager in Visual Studio for Mac, click Tools > SDK Manager:
The Android SDK Manager opens in the Preferences window, whichcontains three tabs, Platforms, Tools, and Locations:
The tabs of the Android SDK Manager are described in thefollowing sections.
Locations tab
The Locations tab has three settings for configuring the locationsof the Android SDK, Android NDK, and the Java SDK (JDK). Theselocations must be configured correctly before the Platforms andTools tabs will function properly.
When the SDK Manager starts, it automatically determines the path foreach installed package and indicates that it was Found by placing agreen checkmark icon next to the path:
Click the Reset to Defaults button to cause the SDK Manager to lookfor the SDK, NDK, and JDK at their default locations.
Typically, you use the Locations tab to modify the location of theAndroid SDK and/or the Java JDK. You do not need to install the NDK todevelop Xamarin.Android apps — the NDK is used only when you needto develop parts of your app using native-code languages such as C andC++.
Tools tab
The Tools tab displays a list of tools and extras. Use this tabto install the Android SDK tools, platform tools, and build tools.Also, you can install the Android Emulator, the low-level debugger(LLDB), the NDK, HAXM acceleration, and Google Play libraries.
For example, to download the Google Android Emulator package, click thecheck mark next to Android Emulator and click the Apply Changesbutton:
A dialog may be shown with the message, The following package requiresthat you accept its license terms before installing:
Click Accept if you accept the Terms and Conditions. At the bottomof the window, a progress bar indicates download and installationprogress. After the installation completes, the Tools tab will showthat the selected tools and extras were installed.
Platforms tab
The Platforms tab displays a list of platform SDK versions alongwith other resources (like system images) for each platform:
Install Android Build Tools
This screen lists the Android version (such as Android 8.1), thecode name (Oreo), the API level (such as 27), and the sizes ofthe components for that platform (such as 1 GB). You use thePlatforms tab to install components for the Android API level thatyou want to target. For more information about Android versions and APIlevels, see Understanding Android API Levels.
When all components of a platform are installed, a checkmark appears nextto the platform name. If not all components of a platform areinstalled, the box for that platform is filled.You can expand a platform to see its components (and which componentsare installed) by clicking the arrow to the left of the platform.Click down arrow to unexpand the component listing for a platform.
To add another platform to the SDK, click the box next to the platformuntil the checkmark appears to install all of its components, thenclick Apply Changes:
To install only some components, click the box next to the platformonce. You can then select any individual components that you need:
Notice that the number of components to install appears next to theApply Changes button. After you click the Apply Changes button,you will see the License Acceptance screen as shown earlier.Click Accept if you accept the Terms and Conditions. You may seethis dialog more than one time when there are multiple components toinstall. At the bottom of the window, a progress bar will indicatedownload and installation progress. When the download and installationprocess completes (this can take many minutes, depending on how manycomponents need to be downloaded), the added components are marked witha checkmark and listed as Installed.
Repository selection
By default, the Android SDK Manager downloads platform components andtools from a Microsoft-managed repository. If you need access toexperimental alpha/beta platforms and tools that are not yet availablein the Microsoft repository, you can switch the SDK Manager to useGoogle’s repository. To make this switch, click the gear icon in thelower right-hand corner and select Repository > Google(Unsupported):
When the Google repository is selected, additional packages may appearin the Platforms tab that were not available previously. (In theabove screenshot, Android SDK Platform 28 was added by switching tothe Google repository.) Keep in mind that use of the Google repository isunsupported and is therefore not recommended for everyday development.
To switch back to the supported repository of platforms and tools,click Microsoft (Recommended). This restores the list of packagesand tools to the default selection.
Summary
This guide explained how to install and use the Xamarin Android SDKManager tool in Visual Studio and Visual Studio for Mac.