Updates of the Android Studio 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 dialog box when an update is available for the IDE. You can also check for updates manually by clicking Help > Check for Update (on Mac, Android Studio > Check for Updates).
Android Studio updates are available in the following release channels:
Canary channel: cutting-edge releases, updated weekly and available for download at developer.android.com/studio/preview.
In addition to receiving Canary versions of Android Studio, you’ll also get preview versions of other SDK tools, including Android Emulator.

While these builds are more buggy, they are tested and we want to provide early access so you can try out new features and provide feedback. This channel is not recommended for production development.
Developer channel: Canary builds that have passed a full round of internal testing.
Beta channel: potential releases based on stable Canary builds, released for feedback before moving to stable channel
Stable channel: official stable release that is available for download at developer.android.com/studio
If you want to try one of the preview channels (Canary, beta or developer) and, at the same time, use the stable build for your Android production projects, you can install both.

To change the update channel for an existing installation, do the following:
Open the Preferences window by clicking File > Settings (on Mac, Android Studio > Preferences).
In the left pane, click Appearance & Behavior > System Settings > Updates.
Make sure that Automatically check for updates is checked, and then select a channel from the drop-down list (see Figure 1).
Click Apply or OK.

How to delete unused Android Studio directories

When you run a major version of Android Studio for the first time, it looks for directories that contain caches, configurations, indexes, and logs of Android Studio versions for which the corresponding installation cannot be found. In the Delete Unused Android Studio Directories dialog box, the locations, sizes, and last modification times of these unused directories are displayed, and you are given the option to delete them.
The directories that Android Studio considers for deletion are as follows:
Linux: ~/.AndroidStudio[Preview]version.
Mac: ~/Library/{Preferences, Caches, Logs, Application Support}/AndroidStudio[Preview]version
Windows: %USER%.AndroidStudio[Preview]version

How to update your tools with SDK Manager

Android SDK Manager allows you to 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 Android SDK Location, shown in Figure 2.
To open the SDK Manager from within Android Studio, click Tools > SDK Manager or SDK Manager in the toolbar. If you are not using Android Studio, you can download tools using the sdk manager command-line tool.
When there is an update for a package you already have, a dash will appear in the check box next to the package.
To update an item or install a new one, click the check box so that a check mark is displayed.
To uninstall a package, click to clear the check box.
Pending updates are indicated in the left column with a download icon. Pending deletions are indicated by a red cross .
To upgrade the selected packages, click Apply or OK and, if there are any license agreements, accept them.

Recommended packages

You should be especially aware of the following tools in the SDK Tools tab:
Android SDK Build Tools.
Required. Tools for compiling Android apps are included. See the release notes for the SDK build tools.
Android SDK Platform Tools
Required. Includes several tools required by the Android platform, including the adb tool.
Android SDK tools
Mandatory. Includes essential tools such as ProGuard. See the release notes for the SDK tools.
Android Emulator
Recommended. A QEMU-based device emulation tool that you can use to debug and test your apps in a real Android runtime environment. See the Android Emulator release notes.
Note: Most of the API libraries that were previously provided through the compatibility repository packages (such as the Android compatibility library, constraint design, Google Play Services, and Firebase) are now available through Google’s Maven repository. Projects built with Android Studio 3.0 and above include this repository in the build configuration. If you are using an older project, you must add the Google Maven repository manually to your build.gradle file.
On 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 the required ones, click the checkbox next to the version name.
If you want to see all the packages available for each Android platform, click Show Package Details at the bottom of the window. For each platform version, you will find the following packages:

Android SDK Platform
Required. You must have at least one platform in your environment in order to build your application. To provide the best user experience on the latest devices, use the latest platform version as the target for your build. You will be able to run your app on older versions, but you must build based on the latest version in order to be able to use the new features when you run the app on devices with the latest version of Android.

Intel or ARM system images
Recommended. The system image is mandatory to run Android Emulator. Each platform version includes the supported system images. You can also download system images later when creating Android Virtual Devices (AVD) in AVD Manager. Select Intel or ARM depending on the processor of your development computer.
Note: If you want to use Google Play Services APIs (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 definitive and you can add other sites to download additional third-party packages.
In some cases, an SDK package may require a specific minimum revision of another tool. If this is the case, SDK Manager will notify you with a warning and add the dependencies to your download list.
Tip: You can also customize the build.gradle file so that each project uses specific build options and a specific build chain. For more information, see Configuring Gradle builds.

How to edit or add SDK tool sites
To manage the SDK sites where Android Studio checks for tools and updates to third-party Android tools, click the SDK Update Sites tab. You can add other sites that contain their own tools, and then download packages from those sites.
For example, a cellular provider or device manufacturer might offer additional API libraries that support their own Android-powered devices. If you want to develop with their libraries, you can install their Android SDK package. To do so, add the URL of their SDK tools to SDK Manager in SDK Update Sites.
If a vendor or device manufacturer hosted an SDK plugin repository file on their website, follow the steps below to add their site to Android SDK Manager:
Click the SDK Update Sites tab.
Click Add at the bottom of the window.
Type the name and URL of the third-party site and click OK.
Make sure the check box is selected in the Enabled column.
Click Apply or OK.
All SDK packages available on the site now appear in the SDK Platforms or SDK Tools tab, as appropriate.
How to automatically 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 the missing SDK packages that a project depends on, provided that the corresponding SDK license agreements have been accepted via SDK Manager.

When you accept the license agreements via SDK Manager, Android Studio creates a license directory within the main SDK directory. This license directory is required for Gradle to automatically download the missing packages.
Note: When you accept the license agreements using the android command-line tool, this license directory is not created. You must first accept the agreements via SDK Manager in order to use this feature.
If you accepted the license agreements on one workstation, but want to compile your projects on another workstation, you can copy the accepted license directory to export your licenses. To copy the licenses to another computer, follow these steps:

On a computer with Android Studio installed, click Tools > Android > SDK Manager. At the top of the window, note the location of the Android SDK.
Navigate to that directory and locate the licenses/ directory inside it. (If you don’t see a licenses/ directory, go back to Android Studio, update your SDK tools, and make sure you accept the license agreements. When you return to the main Android SDK directory, you should now see the directory).

Copy the entire licenses/ directory and paste it into the main Android SDK directory where you want to compile your projects.
Gradle will now be able to automatically download the missing packages that your project depends on.
Note that this feature is automatically disabled for versions running from Android Studio, since SDK Manager takes care of downloading the missing packages from the IDE. You can also manually disable this feature by setting android.builder.sdkDownload=false in your project’s gradle.properties file.

Leave a Reply

Your email address will not be published. Required fields are marked *

Proudly powered by WordPress | Theme: Looks Blog by Crimson Themes.