In normal if you download the official Android SDK and Android studio on your PC you will get the ADB and Fastboot tools. This download will weigh around 1 GB in size and can be downloaded for free. This download comes as a package and for users who just need the ADB and Fastboot tool this download may look like a waste of data and time. Download Android Studio for Mac Download Android Studio for Mac android-studio-ide-1-mac.dmg. Download Android Command Line Tools for Linux Download Android Command Line Tools for Linux. 1.1 The Android Software Development Kit (referred to in the License Agreement as the 'SDK' and specifically including the Android system files. To launch the Android SDK manager without Android Studio, open a terminal and navigate to the tools/ directory of the SDK Tools Package location, then execute the program ‘android’. If you would rather download packages directly from the command-line, instead run android list sdk -a to see a list of packages, then run android update sdk -a.
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
To use the Xamarin Android SDK Manager, you will need the following:
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:
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:
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 specfic 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:
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:
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.
Source Sdk ToolsLocations 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:
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.
Related Links
If you’ve ever tried to root your Android phone or flash a ROM, you may have heard about ADB and/or fastboot. These two tools are surprisingly powerful, but can be a bit overly complex to install. Here’s how to do it the easy way.
Everything You Need to Know About Rooting Your Android Phone
We love Android, but rooting your phone can give you the opportunity to do so much more than your…
Read more Read
Advertisement
Update: Google recently released ADB and fastboot as a standalone download. Now you don’t need to download a huge developer kit just to mod you’re phone! We’ve updated our guide below to reflect the changes and to use Google’s official download instead of third-party services.
What are ADB and Fastboot?
These two tools allow you to send terminal commands to your phone from your computer via USB. They both serve different functions, but they can be installed with relative ease at the same time, so it’s helpful to have both. Here’s a (very) brief breakdown on what these tools do:
Advertisement
Download Android Studio And Sdk Tools For Mac
Both of these tools come with the Android SDK, however that’s an extremely large download that, frankly, most users who are interested in ADB and fastboot don’t need. Fortunately, Google recently made it easy to get these two without all the junk.
Step 1: Download the Platform Tools Package
Advertisement
Google collectively refers to ADB, fastboot, and a few other utilities as the Platform Tools package. You can download the Platform Tools package from the SDK website here. There are separate packages for Windows, Mac, and Linux so download the appropriate version for your platform.
Download Android Studio Sdk Tools
Once you’ve downloaded the Platform Tools package, extract the contents of the .zip file to a folder you can find later (like “C:Androidplatform-tools”). You don’t actually need to install ADB and fastboot to use them, but you can take an extra step to make them more convenient for you.
Advertisement
By default, you’ll either have to navigate to the folder where you extracted the Platform Tools package and run any ADB or fastboot command from there, or write out the full path where ADB is every single time you want to run a command. For example, this is a simple command to see what devices are attached to your system:
adb devices
If your command prompt isn’t open to the location where you extracted the Platform Tools, however, you would have to type something like this:
Android Sdk Tools Latest Downloadc:Androidplatform-toolsadb.exe devices
That’s a pain to go through every single time you want to tweak something on your phone. To fix this, we can modify something called the PATH variable so that you can run ADB and fastboot commands no matter which folder you’re in.
Advertisement
Step 2: Edit Your PATH Variable
Advertisement
The PATH variable is a master list of where to look for command line tools. By default your computer already knows where to find a few really useful tools. Here, we’ll add ADB and fastboot to that list to make it much easier to use them in the future. You’ll need to know where you extracted the Platform Tools package in the last step, so keep that folder location handy.
WindowsAndroid Sdk Download Mac
Depending on which version of Windows you’re using, these steps may be slightly different. To add ADB to your PATH variable, follow these steps:
Advertisement
Now when you want to use ADB or fastboot, simply open a command prompt from the Start Menu and enter your commands.
MacOS/Linux
Editing the macOS and Linux PATH files are a little more complicated than on Windows. However, if you’re comfortable with a command line, it’s still pretty simple. This method will automatically add the location of ADB and fastboot to your PATH every time you log into your system:
Advertisement
From now on, any time you open a Terminal window, you can run ADB and fastboot commands from wherever you are.
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. Archives
December 2020
Categories |