Android Sdk Manager For Mac



Go Up to Deploying Applications Overview

Android sdk free download - Android SDK Tools, Android File Transfer, Eclipse SDK, and many more programs. Android sdk manager, google android sdk. Sync contacts, music, photos, ringtones.

  • To start the SDK Manager in Visual Studio for Mac, click Tools SDK Manager. The Android SDK Manager opens in the Preferences window, which contains three tabs, Platforms, Tools, and Locations. The tabs of the Android SDK Manager are described in the following sections.
  • Uncheck Android SDK Tools Installed with Unity (recommended). In the SDK field, enter the path to the SDK installation folder, or use the Browse button to locate it. Unity works with the most recent version of the Android SDK available at the time of the Unity version release.
  • Download Android SDK Build-tools 19.1.1, 20.0.0, 21.1.1, 22.0.0, 23.0.0, 23.0.0, 23.0.0, 24.0.0, 24.0.0, 24.0.0, 24.0.0, 25.0.0, 25.0.0, 25.0.0, 25.0.0.


Tools > Options > Deployment > SDK Manager

In the Projects Window, right-click a platform in Target Platforms and click Edit SDK

Displays the existing SDKs, and enables you to add and manage SDKs for macOS, iOS, and Android.

  • 4SDK Panel
    • 4.2Android SDK, NDK and Java Properties
  • 5Troubleshooting (macOS and iOS)

What an SDK Does

A software development kit (SDK) provides the software required to build your applications for a target platform. In the SDK Manager page, an SDK provides the information that RAD Studio needs to locate the required software in your system.

macOS and iOS SDKs provide:

  • A list of absolute paths to files and folders on the Mac that are required to build applications for the SDK target platform.
  • A copy of those files, which can be pulled from the Mac using a connection profile.

Android SDKs contain the paths to the required software in your system.

On the SDK Manager page, for each target platform that has an associated SDK, one SDK is the default SDK, which appears in bold type. Windows platforms do not have a default SDK.

When You Must Add an SDK

SDKs are required for the following platforms and application types:

  • C++ multi-device applications for the macOS platform.
  • Multi-device applications for the iOS Device - 32 bit platform.
  • Multi-device applications for the iOS Device - 64 bit platform.
  • Multi-device applications for the Android platform.
Sdk
Note: If your Android SDK and NDK are installed by the RAD Studio installer, the installed locations are known to the SDK Manager. In this case, the SDK fields should be auto-populated, and you do not need to add an SDK for your Android apps.

File Names and File Extension for SDKs

SDK names have few restrictions other than that they must be valid filenames, as determined by System.IOUtils.TPath.HasValidFileNameChars. Duplicated SDK names result in an error (from the attempted Add or Import).

The SDK file extension is .sdk, which is added automatically when the SDK is saved as a file.

Examples of names for an SDK:

  • MyFirstOSXSdk
  • Gr8daZ!

Each SDK you have defined is saved as an .sdk file in your Application Data folder (as returned by DesignIntf.IDesigner170.GetAppDataDirectory), such as the following folder on Windows 7:

C:Users<username>AppDataRoamingEmbarcaderoBDS21.0

The file contains the information about the SDK, such as the paths to the software required to build applications for the SDK target platform.

The actual SDK files (the SDK local file cache) are stored by default in C:Users<user>DocumentsEmbarcaderoStudioSDKs.

To change the SDK local file cache location of an SDK:

  • For Android, adjust the paths in the SDK Manager to point to the new location.
  • For macOS or iOS, see Changing the Local Root Directory of a macOS, iOS Device or iOS Simulator SDK.

SDK Panel

ItemDescription

SDK versions

Lists the SDKs that have been defined, along with their associated platform. Boldface indicates the default SDK for a platform.

  • To set a default SDK for a platform, do either of the following:
    • Right-click the SDK entry and select Set as Default.
    • Double-click the SDK entry.
  • To edit an SDK, select it in the SDK versions list, make changes to the SDK Properties, and then click Save (without the Save, your changes are not saved).

Clicking one of the SDKs enables the buttons for managing an SDK (Delete and Export).

SDK Properties

Displays the current settings in the selected SDK.

The content of this frame depends on the SDK platform: macOS, iOS or Android.

macOS and iOS SDK Properties

These are the fields that you can see in the SDK Properties frame when you select a macOS or iOS SDK.

Local root directory

Displays the directory on the local machine where files from the remote machine are cached. The default value is:

The value for the variable $(BDSPLATFORMSDKSDIR) is set on Tools > Options > IDE > Environment Variables

For C++, this directory is specified to the compiler with the --sysroot option. The remote paths are implicitly prefixed with the local root directory.

You can set the current values as the new default values by clicking Save paths as the default for selected platform in the Remote paths pane.

Remote paths

Displays the list of paths on the remote machine that are pulled to the local machine.

A remote path is made up of:

  • Directory. Represents the directory on the target or intermediate platform.
  • File mask. Represents either the file name (for a single file) or the * (asterisk) wildcard, which matches all files in the specified directory. Example: OpenGL.
  • Subdirectories. Indicates whether to include subdirectories.

There are four categories of remote paths, and the category determines how the paths/items are passed to the C++ compiler and linker, as follows:

  • Include paths are passed to the compiler as part of the --sysinc path (the system include file search path with root directory prepended).
  • Library paths are passed to the linker as part of the --syslib path (the system library search path with root directory prepended).
  • Frameworks are passed to the compiler (with the --framework option) and to the linker (with the --Ff option).
  • Other paths are not passed to the compiler/linker by default, but are pulled to the local machine.

All items specified are pulled to the local machine. See PAClient.

All paths should use the style appropriate for the target host machine. For example, use forward slashes (/) as separators for paths on Mac hosts. Certain punctuation marks such as the tilde (~) should be recognized for Mac.

The buttons on the Remote Paths field are described below:

ButtonDescription

Add a new path item

Displays the Add Remote Path Item dialog box. You can also add a new SDK by pressing the Insert key on the keyboard while the Remote paths list is in focus.

Edit the selected path item

Displays the Edit Remote Path Item dialog box.

Delete the selected path item

Displays a confirmation dialog box and, if accepted, deletes the selected path item. You can also delete a path by pressing the Delete key on the keyboard while the Remote paths list is in focus and a path item is selected.

Reset paths to defaults for the selected platform

Displays a confirmation dialog box, and, if accepted, overwrites all path items with the default SDK's values for the selected platform. Includes the Local root directory only if it is blank.

The values being restored are determined as follows:

  • If you have not reset the defaults, the values are the RAD Studio default values.
  • After you reset the defaults, the new values become the default values and are stored in the <platform>.defaultsdkpaths file in your C:Users<username>AppDataRoamingEmbarcaderoBDS21.0 directory. So clicking restores the new defaults you created.
  • To restore the original defaults, delete the .defaultsdkpaths file for the target platform. The original default paths now appear on your new SDKs.

Save paths as defaults for selected platform

Overwrites all default path items with the specified SDK value path items for the selected platform. After you save paths as defaults, the new values you enter here are the ones that are restored when you click (Reset paths to defaults).

When you save default paths, a file is created for the defaults. The file name is the platform name with a .defaultsdkpaths extension.

For example:

Macintosh macOS

OSX32.defaultsdkpaths

Win32

Win32.defaultsdkpaths

Win64

Win64.defaultsdkpaths

To abandon your settings and restore the original defaults, first delete the .defaultsdkpaths file located in the directory that %APPDATA% expands to (that is, C:Users<username>AppDataRoamingEmbarcaderoBDS21.0) and then click (Reset paths to defaults).

Up Button

Moves the selected path item up within its path group. You can also move an item up by pressing the Ctrl+Up-Arrow key combination on the keyboard while the Remote paths list is in focus.

Down Button

Moves the selected path item down within its path group. You can also move an item down by pressing the Ctrl+Down-Arrow key combination on the keyboard while the Remote paths list is in focus.

Update Local File Cache

Prompts you for a connection profile, and uses the selected connection profile to pull all of the specified files to the local (development) machine from the remote target machine. Only files with different sizes or timestamps than those files already in the SDK local file cache are pulled. A progress dialog is shown when pulling, giving you the opportunity to cancel the process. You are also prompted before any local files are overwritten.

You should click this button after you make changes to paths on the SDK Manager dialog box.

Add

Launches the Add a New SDK dialog box so that you can add an SDK for a target platform using a connection profile. The keyboard equivalent is pressing the Insert key on the keyboard while the SDKs list is in focus.

Delete

Prompts you for confirmation and, if accepted, deletes the currently selected SDK. You can also delete an SDK by pressing the Delete key on the keyboard while the SDKs list is in focus.

Export

Prompts you for a filename and saves the SDK settings to that location (the default file name is '<sdk-name>.sdk').

Import

Prompts you for a .sdk filename and imports the contained SDK settings into the IDE.

Android SDK, NDK and Java Properties

These are the fields that you can see in the Properties pane when you select an Android SDK. The Properties pane provides three tabs: SDK, NDK and Java.

SDK Tab

ItemDescription

SDK base path

The location of the Android SDK folder.

For RAD Studio to recognize your Android SDK folder as a valid Android SDK folder, this folder must contain a tools subfolder, and this subfolder must contain a source.properties file. The source.properties file defines the version (Pkg.Revision) of your Android SDK.

ZipAlign location

The location of the ZipAlign.exe SDK tool.

For example:

  • <Android SDK base path>toolsZipAlign.exe
  • <Android SDK base path>build-tools<version>zipalign.exe

Android location

The location of the Android.bat SDK tool.

Adb location

The location of the Adb.exe SDK platform tool.

Aapt location

The location of the aapt.exe SDK build tool.

SDK API-Level location

The location of the SDK API level folder to use. Any version is fine (for example, <SDK folder>platformsandroid-17).

For RAD Studio to recognize your SDK API-level folder as a valid folder, this folder must contain an android.jar file.

NDK Tab

ItemDescription

NDK base path

The location of the Android NDK folder.

arm-linux-androideabi-ld.exe location

The location of the arm-linux-androideabi-ld.exe linker (for example, <NDK folder>toolchainsarm-linux-androideabi-4.6prebuiltwindowsbin).

arm-linux-androideabi-strip.exe location

The location of the arm-linux-androideabi-strip.exe executable (for example, <NDK folder>toolchainsarm-linux-androideabi-4.6prebuiltwindowsbin).

RAD Studio uses this executable to reduce the size of your Android application packages.

gdbserver location

The location of the GDB server within the Android NDK folder (for example, <NDK folder>prebuiltandroid-armgdbserver).

NDK API location

The location of the API folder within the Android NDK folder (for example, <NDK folder>platformsandroid-14).

For RAD Studio to recognize your NDK API folder as a valid folder, this folder must contain a file at arch-armusrliblibandroid.so.

C++Builder NDK Library path

The location of the C++ library folder within the Android NDK folder (for example, <NDK folder>platformsandroid-14arch-armusrlib).

Click the ellipsis () to open Directories if you want to add, replace or delete new library paths.

Delphi NDK Library path

The location of the Delphi library folder within the Android NDK folder (for example, <NDK folder>sourcescxx-stlstlportlibsarmeabi-v7a).

Click the ellipsis () to open Directories if you want to add, replace or delete new library paths.

Java Tab

ItemDescription

KeyTool location

The location of the KeyTool.exe JDK tool.

JarSigner location

The location of the JarSigner.exe JDK tool.

Note: You cannot use network addresses starting with a double backslash as locations in the Android SDK properties. For example, mycompany.comandroidsdk is not a valid value here. Use a network drive instead.

Troubleshooting (macOS and iOS)

Handling Multiple Xcode Installations

If you have more than one installation of Xcode, you must make sure that the xcode-select command-line tool points to your main Xcode installation folder. Type xcode-select -p to see the path to the currently selected developer directory:

If the command-line tool points to a folder that is not your main Xcode installation folder, type xcode-select -s <path> to set the developer directory, such as:

For further information, see the Apple documentation for xcode-select.

Missing SDK Versions Because the Xcode Directory Is Wrong

After you select a connection profile on the Add a New SDK dialog box, the Select an SDK version drop-down is filled with the SDK versions detected by the Platform Assistant on the remote machine.

If the Select an SDK version drop-down list is empty, an expected SDK version is not listed, or you get the following error:

Check your Xcode installation on your Mac, and make sure that the xcode-select command-line tool points to your Xcode installation folder. See Handling Multiple Xcode Installations.

If the path pointed by xcode-select is correct, check the contents of the following directory:

<Xcode developer directory>/Platforms/<platform>.platform/Developer/SDKs/
Such as: /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/

where platform is:

  • MacOSX for the macOS platform
  • iPhoneOS for the iOS Device - 32 bit and iOS Device - 64 bit platforms
  • iPhoneSimulator for the iOS Simulator platform

The Platform Assistant reads the SDK versions from that directory, and the Select an SDK version drop-down list contains only those SDK versions.

Note: The Platform Assistant provides an additional SDK, Command Line Tools, that you need to install for the macOS platform only.

'UnKnown Compiler' Error After Updating XCode

[bccosx Fatal Error]... unKnown Compiler error might happen after updating XCode on macOS.

To solve this problem follow the steps:

  • Delete the SDK from the SDK Manager.
    • Go to Tools > Options > Deployment > SDK Manager
      Note: You can also access the SDK Manager by going to Projects Window
    • Select the SDK version under the macOS section and click Delete.
  • Remove all the content from the SDK folder on the machine where RAD Studio is installed.
    • The SDK folder is located at DocumentsEmbarcaderoStudioSDKs.
  • Remove the scratch-dir folder located at the PAServer directory on the macOS.

Once you perform all the steps, launch again the application to add a new SDK.

Topics

See Also

Retrieved from 'http://docwiki.embarcadero.com/RADStudio/Sydney/e/index.php?title=SDK_Manager&oldid=271419'
-->

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:

  • 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:

Open Android Sdk Manager Mac

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:

  1. The Android SDK Manager was unable to locate the Android SDK.

  2. 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:

Android Sdk Install Mac Brew

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:

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):

Install

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