Android studio android sdk


How to Download A New API For SDK In Android Studio

When developing an application we require a min sdk version or API level for Android app development. Some cases the earlier app which you have developed was in older version and your current Android Studio sdk does not have that version and you are looking to get that version in your android studio then follow the below given steps:

There will be two approaches to get this work done. We will look on them one by one.

How to Download a new API for sdk in Android Studio

Approach I To Download A New API For SDK

Step 1: Open your android studio

Step 2: Click on Tools options in Android toolbar. Select Android > SDK manager

Step 3: Android studio will show you an pop up window. Select SDK Platforms

step 4: Here you will get the list of all available Android version. The status of every API is given(Installed/partially installed/not installed)

Step 5: Select your desired API level and Click apply to install.

Step 6: Android Studio will show you another window. Click on Accept and click Next, android studio will start downloading your desired API level.

Note: In this approach you will be able to download the Source tools for you API level. But if You want to get the More detailed info about your required API then follow approach II.

Approach II To Download New Api in SDK

Step 1: Select Tools>Android>sdk manager

Step 2: Once you will get the pop up window then click on “Launch Standalone SDK Manager”

Step 3: Android studio will open up another classic SDK manager window.

Step 4: Inside this classic sdk manger window you will get the detailed info for even API level. You can select the packages you want to download and click on install Packages.

Step 5: click on Accept all to accept the license and sdk manager will start downloading your API level.

abhiandroid.com

Update the IDE and SDK Tools

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

Update Your IDE and Change Channels

Android Studio notifies you with a small bubble dialog when an update is available for the IDE, but you can manually check for updates by clicking Help > Check for Update (on Mac, Android Studio > Check for Updates).

Updates for Android Studio are available from the following release channels:

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, you can install both side by side.

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

  1. Open the Preferences window by clicking File > 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 Updates preferences.

Update Your Tools with the SDK Manager

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

To open the SDK Manager from Android Studio, click Tools > Android > SDK Manager or click SDK Manager in the toolbar. If you're not using Android Studio, you can download tools using 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.

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

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

Figure 2. The Android SDK Manager.

Recommended packages

You should give special consideration to the following tools in 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 the Android 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 the Support 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 the build configuration. If you're using an older project, you must manually add Google's Maven repository to your build.gradle file.

In the SDK Platforms tab, you must also install at least one version of the Android platform. Each version provides several different packages. To download only those that are required, click the check box next to the version name.

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

Android SDK Platform Required. At least one platform is required in your environment so you're able to compile your application. In order to provide the best user experience on the latest devices, use the latest platform version as your build target. You'll still be able to run your app on older versions, but you must build against the latest version in order to use new features when running on devices with the latest version of Android. Intel or ARM System Images Recommended. The system image is required in order to run the Android Emulator. Each platform version contains the supported system images. You can also download system images later when creating Android Virtual Devices (AVDs) in the AVD Manager. Select either Intel or ARM based on your development computer's processor.

Note: If you plan to use APIs from Google Play services (including Firebase), you must use either the Google APIs system image or 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 packages from third parties.

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

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

Edit or add SDK tool sites

To manage which SDK sites Android Studio checks for Android tools and third party tool updates, click the SDK Update Sites tab. You can add other sites that host their own tools, then download the packages from those sites.

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

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

  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 Enabled column.
  5. Click Apply or OK .

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

Auto-download missing packages with Gradle

When you run a build from the command line, 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.

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.

developer.android.com

SDK Platform Release Notes | Android Studio

  1. Android 7.1 (API level 25)
  2. Android 7.0 (API level 24)
  3. Android 6.0 (API level 23)
  4. Android 5.1 (API level 22)
  5. Android 5.0 (API level 21)
  6. Android 4.4W (API level 20)
  7. Android 4.4 (API level 19)
  8. Android 4.3 (API level 18)
  9. Android 4.2 (API level 17)
  10. Android 4.1 (API level 16)
  11. Android 4.0.3 (API level 15)
  12. Android 4.0 (API level 14)
  13. Android 3.2 (API level 13)
  14. Android 3.1 (API level 12)
  15. Android 3.0 (API level 11)
  16. Android 2.3.3 (API level 10)
  17. Android 2.3 (API level 9)

This page provides release information about the SDK packages available for download from the SDK Manager, in the SDK Platforms tab.

Each SDK Platform version includes the following packages:

The revision numbers listed below are for the Android SDK Platform package only. The system images may receive separate updates, usually to resolve various bugs with the emulator. There are no release notes for the system images but you should always keep them up to date.

Important: To see the most recent Android system components in the Android SDK Manager, you must first update SDK Tools to the most recent release and restart the SDK Manager.

Android 7.1 (API level 25)

For details about the platform changes, see Android 7.1 for Developers.

Revision 3 (December 2016)

Incremental update. Released as the final Android 7.1.1 (no longer in preview).

Dependencies:

Revision 2 (November 2016)

Incremental update. Released as Android 7.1.1 Developer Preview 2. For more information, see the Android 7.1 API Overview.

Dependencies:

Revision 1 (October 2016)

Initial release for Android 7.1 (API level 25). Released as Android 7.1 Developer Preview 1. For more information, see the Android 7.1 API Overview.

Dependencies:

Android 7.0 (API level 24)

For details about the platform changes, see Android 7.0 for Developers.

Revision 1 (August 2016)

Initial release for Android 7.0 (API level 24). For more information, see the Android 7.0 API Overview.

Dependencies:

Android 6.0 (API level 23)

For details about the platform changes, see the Android 6.0 Changes and Android 6.0 APIs.

Revision 2 (November 2015)

Fixed bugs in the layout rendering library used by Android Studio.

Dependencies:

Revision 1 (August 2015)

Initial release for Android 6.0 (API level 23). For more information, see the Android 6.0 API Overview.

Dependencies:

Android 5.1 (API level 22)

For details about the platform changes, see the Lollipop Overview and Android 5.1 API Changes.

Revision 1 (March 2015)

Initial release for Android 5.1 (API level 22). For more information, see the Android 5.1 API Overview.

Dependencies:

Android 5.0 (API level 21)

For details about the platform changes, see the Lollipop Overview and Android 5.0 API Changes.

Revision 2 (December 2014)

Updated layouts in the Support Library and fixed various issues.

Dependencies:

Revision 1 (October 2014)

Initial release for Android 5.0 (API level 21). For more information, see the Android 5.0 API Overview.

Dependencies:

Android 4.4W (API level 20)

This version makes KitKat available for Android Wear.

Revision 2 (October 2014)

Updated the rendering library.

Dependencies:

Revision 1 (June 2014)

Initial release for Android Wear.

Dependencies:

Android 4.4 (API level 19)

For details about the platform changes, see the KitKat Overview and Android 4.4 API Changes.

Revision 2 (December 2013)

Maintenance release. The system version is 4.4.2. For more information, see the Android 4.4 API Overview.

Dependencies: Android SDK Platform-tools r19 or higher is required. Android SDK Tools 22.3 or higher is recommended.

Revision 1 (October 2013)

Initial release. The system version is 4.4. For more information, see the Android 4.4 API Overview.

Dependencies: Android SDK Platform-tools r19 or higher is required. Android SDK Tools 22.3 or higher is recommended.

Android 4.3 (API level 18)

For details about the platform changes, see the Jelly Bean Overview and Android 4.3 API Changes.

Revision 2 (August 2013)

Maintenance update. The system version is 4.3.

Dependencies: Android SDK Platform-tools r18 or higher is required. Android SDK Tools 22.0.4 or higher is recommended.

Revision 1 (July 2013)

Initial release. The system version is 4.3.

Dependencies: Android SDK Platform-tools r18 or higher is required. Android SDK Tools 22.0.4 or higher is recommended.

Android 4.2 (API level 17)

For details about the platform changes, see the Jelly Bean Overview and Android 4.2 API Changes.

Revision 2 (February 2013)

Maintenance update. The system version is 4.2.2.

Dependencies: SDK Tools r21 or higher is required.

Revision 1 (November 2012)

Initial release. The system version is 4.2.

Dependencies: SDK Tools r20 or higher is required.

Android 4.1 (API level 16)

For details about the platform changes, see the Jelly Bean Overview and Android 4.1 API Changes.

Revision 3 (October 2012)

Maintenance update. The system version is 4.1.2.

Dependencies: SDK Tools r20 or higher is required.

Revision 2 (July 2012)

Maintenance update. The system version is 4.1.1.

Dependencies: SDK Tools r20 or higher is required.

Revision 1 (June 2012)

Initial release. The system version is 4.1.0.

Dependencies: SDK Tools r20 or higher is required.

Android 4.0.3 (API level 15)

Revision 3 (March 2012)

Maintenance update. The system version is 4.0.4.

Note: This system image includes support for emulator hardware graphics acceleration when used with SDK Tools r17 or higher. (more info)

Dependencies: SDK Tools r17 or higher is required.

Revision 2 (January 2012)

Maintenance update. The system version is 4.0.3.

Dependencies: SDK Tools r14 or higher is required.

Revision 1 (December 2011)

Initial release. The system version is 4.0.3.

Dependencies: SDK Tools r14 or higher is required.

Android 4.0 (API level 14)

Android 4.0, Revision 2 (December 2011)

Maintenance update. The system version is 4.0.2.

Dependencies: SDK Tools r14 or higher is required.

Android 4.0, Revision 1 (October 2011)

Initial release. The system version is 4.0.1.

Dependencies: SDK Tools r14 or higher is required.

Android 3.2 (API level 13)

Android 3.2, Revision 1 (July 2011)

Initial release. SDK Tools r12 or higher is recommended.

Android 3.1 (API level 12)

Android 3.1, Revision 3 (July 2011)

Dependencies:

Requires SDK Tools r12 or higher.

Notes:

Improvements to the platform's rendering library to support the visual layout editor in the ADT Eclipse plugin. This revision allows for more drawing features in ADT and fixes several bugs in the previous rendering library. It also unlocks several editor features that were added in ADT 12.

Android 3.1, Revision 2 (May 2011)

Dependencies:

Requires SDK Tools r11 or higher.

Notes:

Fixes an issue with the visual layout editor rendering library that prevented Android 3.1 from running in ADT.

Android 3.1, Revision 1 (May 2011)

Dependencies:

Requires SDK Tools r11 or higher.

Android 3.0 (API level 11)

Android 3.0, Revision 2 (July 2011)

Dependencies:

Requires SDK Tools r12 or higher.

Notes:

Improvements to the platform's rendering library to support the visual layout editor in the ADT Eclipse plugin. This revision allows for more drawing features in ADT and fixes several bugs in the previous rendering library. It also unlocks several editor features that were added in ADT 12.

Android 3.0, Revision 1 (February 2011)

Dependencies:

Requires SDK Tools r10 or higher.

Android 2.3.3 (API level 10)

Android 2.3.3, Revision 2 (July 2011)

Dependencies:

Requires SDK Tools r12 or higher.

Notes:

Improvements to the platform's rendering library to support the visual layout editor in the ADT Eclipse plugin. This revision allows for more drawing features in ADT and fixes several bugs in the previous rendering library. It also unlocks several editor features that were added in ADT 12.

Android 2.3.3, Revision 1 (February 2011)

Dependencies:

Requires SDK Tools r9 or higher.

Android 2.3 (API level 9)

Android 2.3, Revision 1 (December 2010)

Dependencies:

Requires SDK Tools r8 or higher.

developer.android.com

Command Line Tools | Android Studio

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

You can install and update each package using Android Studio's SDK Manager or the sdkmanager command line tool. All of the packages are downloaded into your Android SDK directory, which you can locate as follows:

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

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

This package is platform independent and required no matter which Android platform you are developing on.

If you just need these tools because you're not using Android Studio, you can download 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. jobb Allows you to build encrypted and unencrypted APK expansion files in Opaque Binary Blob (OBB) format. lint A code scanning tool that can help you to identify and correct problems with the structural quality of your code. monkeyrunner Provides the command line interface for running program that can install an Android app or test package, run it, send keystrokes to it, takes screenshots, and more. sdkmanager Allows you to view, install, update, and uninstall packages for the Android SDK.

This package includes other tools that you don't need to invoke from the command line (such as ProGuard for code shrinking and obfuscation).

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 are invoked by the build tools and not intended for you. However, the following command line tools might be useful:

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 tools to build your app for different Android versions.

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 update is backward compatible with older platform versions.

In addition to downloading from the SDK Manager, you can download 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.

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 the SDK Tools package.

This site uses cookies to store your preferences for site-specific language and display options. OK

You have successfully signed up for the latest Android developer news and tips.

You requested a page in , but your language preference for this site is .

Would you like to change your language preference and browse this site in ? If you want to change your language preference later, use the language menu at the bottom of each page.

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

developer.android.com


Смотрите также