카테고리 없음

Mac Android Build Tools Download

mensvoratgue1980 2020. 10. 3. 02:09



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.

Google is committed to advancing racial equity for Black communities. See how.

The Android SDK is composed of multiple packages that are required for app development.This page lists the most important command line tools that areavailable, organized by the packages in which they're delivered.

You can install and update each package usingAndroid Studio's SDK Manageror the sdkmanagercommand line tool.All of the packages are downloaded into your Android SDK directory, whichyou can locate as follows:

Android Build Tools Archive Download

  1. In Android Studio, click File > Project Structure.
  2. Select SDK Location in the left pane. The path is shown under Android SDK location.

Android SDK Tools

Located in: android_sdk/cmdline-tools/version/bin/
See also: SDK Tools release notes

If you just need these tools because you're not using Android Studio, you candownload the SDK Tools here.

apkanalyzer
Provides insight into the composition of your APK after the build process completes.
avdmanager
Allows you to create and manage Android Virtual Devices (AVDs) from the command line.
lint
A code scanning tool that can help you to identify and correct problems with the structural quality of your code.
sdkmanager
Allows you to view, install, update, and uninstall packages for the Android SDK.

Android SDK Build Tools

Located in: android_sdk/build-tools/version/
See also: SDK Build Tools release notes

This package is required to build Android apps. Most of the tools in here areinvoked by the build tools and not intended for you. However, the followingcommand line tools might be useful:

aapt2
Parses, indexes, and compiles Android resources into a binary format that is optimized for the Android platform, and packages the compiled resources into a single output.
apksigner
Signs APKs and checks whether APK signatures will be verified successfully on all platform versions that a given APK supports.
zipalign
Optimizes APK files by ensuring that all uncompressed data starts with a particular alignment relative to the start of the file.

Note: You can have multiple versions of the build toolsto build your app for different Android versions.

Android SDK Platform Tools

Located in: android_sdk/platform-tools/
See also: SDK Platform Tools release notes

These tools are updated for every new version of the Android platform to support new features(and sometimes more often to fix or improve the tools), and each updateis backward compatible with older platform versions.

In addition to downloading from the SDK Manager, you candownload the SDK Platform Tools here.

adb
Android Debug Bridge (adb) is a versatile tool that lets you manage the state of an emulator instance or Android-powered device. You can also use it to install an APK on a device.
etc1tool
A command line utility that lets you encode PNG images to the ETC1 compression standard and decode ETC1 compressed images back to PNG.
fastboot
Flashes a device with platform and other system images. For flashing instructions, see Factory Images for Nexus and Pixel Devices.
logcat
This is a tool invoked via adb to view app and system logs.

Android Emulator

Located in: android_sdk/emulator/
See also: Android Emulator release notes

This package is required to use the Android Emulator. It includes the following:.

emulator
A QEMU-based device-emulation tool that you can use to debug and test your applications in an actual Android run-time environment.
mksdcard
Helps you create a disk image that you can use with the emulator, to simulate the presence of an external storage card (such as an SD card).

Note: Prior to revision 25.3.0, the emulator tools were included with theSDK Tools package.

Jetifier

Jetifier reads a library that usesSupport Library classes, and outputs an equivalent library that uses the newerAndroidX classes.

Google is committed to advancing racial equity for Black communities. See how.

Once you install Android Studio, it's easy to keep the Android Studio IDEand Android SDK tools up to date with automatic updatesand the Android SDK Manager.

Update your IDE and change channels

Android Studio notifies you with a small bubble dialog when anupdate is available for the IDE, but you can manuallycheck for updates byclicking Help > Check for Update (on Mac, AndroidStudio > Check for Updates).

Android Studio Build Tools Version

Updates for Android Studio are available from the followingrelease channels:

  • Canary channel: These are bleeding-edgereleases, updated roughly weekly, and available for download atdeveloper.android.com/studio/preview.

    In addition to receiving canary versions of Android Studio, you will also receive previewversions of other SDK tools, including the Android Emulator.

    Although these builds are subject to morebugs, they do get tested and we want to offer them so you can try newfeatures and provide feedback. This channel is not recommended forproduction development.

  • Dev channel: These are hand-picked canary builds thatsurvived a full round of internal testing.
  • Beta channel: These are release candidates based on stablecanary builds, released to get feedback before going into thestable channel.
  • Stable channel: The official stable release that isavailable for download atdeveloper.android.com/studio.

Build

If you'd like to try one of the preview channels (Canary, Dev, or Beta)while still using the Stable build for your production Android projects, youcan install both side by side.

To change the update channel for an existing install, proceed as follows:

  1. Open the Preferences window by clickingFile > Settings (on Mac, Android Studio >Preferences).
  2. In the left panel, click Appearance & Behavior >System Settings > Updates.
  3. Be sure that Automatically check for updates is checked, then select a channel from the drop-down list (see figure 1).
  4. Click Apply or OK.

Figure 1. The Android Studio Updatespreferences.

Delete unused Android Studio directories

When you run a major version of Android Studio for the first time, it looks for directories containing caches, settings, indices, and logs for versions of Android Studio for which a corresponding installation can’t be found. The Delete Unused Android Studio Directories dialog then displays locations, sizes, and last-modified times of these unused directories and provides an option to delete them.

The directories Android Studio considers for deletion are listed below:

  • Linux: ~/.AndroidStudio[Preview]_version_
  • Mac: ~/Library/{Preferences, Caches, Logs, Application Support}/AndroidStudio[Preview]_version_
  • Windows: %USER%.AndroidStudio[Preview]_version_

Update your tools with the SDK Manager

The Android SDK Manager helps you download the SDK tools, platforms, andother components you need to develop your apps. Once downloaded, you can findeach package in the directory indicated as the Android SDK Location,shown in figure 2.

To open the SDK Manager from Android Studio, click Tools >SDK Manager or click SDK Managerin the toolbar. If you're not using Android Studio, you can download toolsusing the sdkmanager command-line tool.

When an update is available for a package you already have, a dash appears in the check box next to the package.

  • To update an item or install a new one, click the check boxso it shows a checkmark.
  • To uninstall a package, click to clear the check box.

Pending updates are indicated in the left column with a download icon. Pending removals areindicated with a red cross .

To update the selected packages,click Apply or OK, then agree to anylicense agreements.

Figure 2. The Android SDK Manager.

Recommended packages

You should give special consideration to the following toolsin the SDK Tools tab:

Android SDK Build-Tools
Required. Includes tools to build Android apps. See the SDK Build Tools release notes.
Android SDK Platform-Tools
Required. Includes various tools required by theAndroid platform, including the adb tool.
Android SDK Tools
Required. Includes essential tools such as ProGuard. See the SDK Tools Release Notes.
Android Emulator
Recommended. A QEMU-based device-emulation tool that you can use to debug and test your applications in an actual Android runtime environment. See the Android Emulator release notes.

Note: Most API libraries that were previously provided by theSupport Repository packages (such as the Android Support Library, Constraint Layout,Google Play services, and Firebase) are now instead available from Google's Maven repository.Projects created with Android Studio 3.0 and higher automatically include this repository in thebuild configuration. If you're using an older project, you must manually add Google's Maven repository to yourbuild.gradle file.

In the SDK Platforms tab, you must also install at least oneversion of the Android platform. Each version provides several differentpackages. To download only those that are required, click the check box nextto the version name.

To see all available packages for each Android platform, clickShow Package Details at the bottom of the window.Within each platform version, you'll find the following packages:

Android SDK PlatformRequired.At least one platform is required inyour environment so you're able to compile your application. In order toprovide the best user experience on the latest devices, use the latest platformversion as your build target. You'll still be able to run your app on olderversions, but you must build against the latest version in order to use newfeatures when running on devices with the latest version of Android.Intel or ARM System ImagesRecommended. The system image is required in order to run the Android Emulator. Each platform versioncontains the supported system images. You can also download system images laterwhen creating Android Virtual Devices (AVDs) in the AVD Manager. Select either Intelor ARM based on your development computer's processor.

Note: If you plan to use APIs fromGoogle Playservices (including Firebase), you must use either the Google APIs system imageor the Google Play system image (the latter includes the Play Store app).

The above list is not comprehensive and you can add other sites to download additional packagesfrom third parties.

Mac Android Build Tools Download

In some cases, an SDK package may require a specific minimum revision ofanother tool. If so, the SDK Manager notifies you with a warning and addsthe dependencies to your list of downloads.

Tip: You can also customize thebuild.gradle file so each project uses a specific build chain andcompilation options. For more information see, Configuring Gradle Builds.

Edit or add SDK tool sites

To manage which SDK sites Android Studio checks forAndroid tools and third party tool updates, click the SDK Update Sitestab. You can add other sites thathost their own tools, then download the packages from thosesites.

Mac Android Build Tools Download Windows 10

For example, a mobile carrier or device manufacturer might offer additionalAPI libraries that are supported by their own Android-powered devices. Todevelop using their libraries, you can install their Android SDK packageby adding their SDK tools URL to the SDK Manager in theSDK Update Sites.

If a carrier or device manufacturer has hosted an SDK add-on repository fileon their website, follow these steps to add their site to the Android SDKManager:

  1. Click the SDK Update Sites tab.
  2. Click Add at the bottom of the window.
  3. Enter the name and URL of the third party site, then click OK.
  4. Make sure the checkbox is selected in the Enabledcolumn.
  5. Click Apply or OK .

Any SDK packages available from the site now appearin the SDK Platforms or SDK Tools tabs,as appropriate.

Auto-download missing packages with Gradle

When you run a build from the command line, or when using Android Studio 3.3 or later, Gradle can automatically download missing SDK packages that a project depends on, as long as the corresponding SDK license agreements have already been accepted using the SDK Manager.

When you accept the license agreements using the SDK Manager, Android Studio creates a licenses directory inside the SDK home directory. This licenses directory is necessary for Gradle to auto-download missing packages.

Note: Accepting the license agreements using the android command line tool does not create this licenses directory. You must first accept the agreements using the SDK Manager to be able to use this feature.

Install Android Build Tools

If you have accepted the license agreements on one workstation, but wish to build your projects on a different one, you can export your licenses by copying over the accepted licenses directory. To copy the licenses to another machine, follow these steps:

  1. On a machine with Android Studio installed, click Tools > Android > SDK Manager. At the top of the window, note the Android SDK Location.
  2. Navigate to that directory and locate the licenses/ directory inside it. (If you do not see a licenses/ directory, return to Android Studio and update your SDK tools, making sure to accept the license agreements. When you return to the Android SDK home directory, you should now see the directory.)
  3. Copy the entire licenses/ directory and paste it into the Android SDK home directory on the machine where you wish to build your projects.

Gradle will now be able to automatically download missing packages your project depends on.

Note that this feature is automatically disabled for builds you run from Android Studio, as the SDK manager handles downloading missing packages for the IDE. You can also manually disable this feature by setting android.builder.sdkDownload=false in the gradle.properties file for your project.