Android sdk location change

Different Ways to Change Android SDK Path in Android Studio

Android SDK is one of the most useful components which is required to develop Android Applications. Android SDK is also referred to as the Android Software Development Kit which provides so many features which are required in Android which are given below:

  • A sample source code.
  • An Emulator.
  • Debugger.
  • Required set of libraries.
  • Required APIs for Android development with their documentation.
  • Tutorials required for Android OS development.

Why There is a Need to Change Android SDK Path?

Android SDK comes itself when we download Android Studio. It downloads when we download our Android Studio. But many times due to some issue in our pc these SDK files may get deleted. And without your Android SDK Android studio is not able to work and we cannot develop any application. Android SDK is the heart of Android studio. We can easily download Android SDK from the android developers’ site, but we have to set the path for this SDK in our Android studio as well to use this SDK.

Now the point that comes here is how we can change the SDK path for our Android application in Android Studio. So in this article, we are going to discuss three different methods to Change Android SDK Path in Android Studio.

Method 1

Step 1: Create a new Project in Android Studio

Navigate to the File > New > New Project and create your new project. The language used for this will not matter as this process will be the same for both java as well as Kotlin.

Step 2: Opening project structure

Navigate to the File > Click on Project structure which is shown in the list and click on the Project structure option. After clicking that option you will get to see the below screen.

Inside the above screen, click on the SDK Location option you will get to see the below screen.

In the above image, you will get to see the current SDK location for your Android Studio. To change this SDK location you have to click on the 3 dots which are being displayed and then select your SDK location folder. After selecting this folder click on the OK option to save your SDK path.

Step 3: Sync your project after adding your SDK path

Now sync your project with Gradle files to check that SDK is working fine. To do this click on File > you will get to see the option as Sync Project With Gradle files option click on that option and sync your project. On successful sync of your project, your SDK location is set perfectly and now you are good to go in developing Android Applications.

Method 2

Step 1: Create a new Project in Android Studio

Navigate to the File > New > New Project and create your new project. The language used for this will not matter as this process will be the same for both java as well as Kotlin.

Читайте также:  Как подключить android без wifi

Step 2: Opening Android Studio Settings

Navigate to the File > Settings option you will get to see below dialog screen. Inside that screen. Click on Appearance and Behavior option > System Settings options and then click on the Android SDK option to get to see the below screen.

Inside this screen, you will get to see your SDK path. You can update your SDK path by clicking on the Edit option. After that select your SDK path, then click on Apply option, and then click on the OK option.

Step 3: Sync your project after adding your SDK path

Now sync your project with Gradle files to check that SDK is working fine. To do this click on File > you will get to see the option as Sync Project With Gradle files option click on that option and sync your project. On successful sync of your project, your SDK location is set perfectly and now you are good to go in developing Android Applications.

Method 3

Step 1: Create a new Project in Android Studio

Navigate to the File > New > New Project and create your new project. The language used for this will not matter as this process will be the same for both java as well as Kotlin.

Step 2: Opening project structure.

Inside your Android Studio in the top right corner, You can get to see the icon below the image for opening the project structure. Click on that option to open your project structure option. You will get to see the below screen. For opening this Project Structure we can also use a shortcut key as:

Shortcut Key

Windows Ctrl+Alt+Shift+S
Mac OS Command + ; (semi-colan)
Linux Ctrl+Alt+Shift+S

After clicking on this option we simply have to follow Step 1 to update our Android SDK.

Inside the above screen, click on the SDK Location option you will get to see the below screen.

In the above image, you will get to see the current SDK location for your Android Studio. To change this SDK location you have to click on the 3 dots which are being displayed and then select your SDK location folder. After selecting this folder click on the OK option to save your SDK path.

Step 3: Sync your project after adding your SDK path

Now sync your project with Gradle files to check that SDK is working fine. To do this click on File > you will get to see the option as Sync Project With Gradle files option click on that option and sync your project. On successful sync of your project, your SDK location is set perfectly and now you are good to go in developing Android Applications.

Источник

Где можно задать свои расположения пакета SDK для Android?

в Visual Studio перейдите в меню сервис параметры > Xamarin > Android Параметры , чтобы просмотреть и задать расположение пакет SDK для Android:

Расположение по умолчанию для каждого пути выглядит следующим образом:

Расположение пакета средств разработки Java:

C:\Program Филес\жава\ jdk1.8.0_131

Расположение пакета SDK для Android

C:\Program Files (x86) \Андроид\андроид-СДК

Расположение пакета Android NDK:

C:\ProgramData\Microsoft\AndroidNDK64\android-ndk-r13b

Обратите внимание, что номер версии NDK может отличаться. Например, вместо android-ndk-r13b может быть более ранняя версия, например android-ndk-r10e.

Чтобы задать расположение пакета SDK для Android, введите полный путь к каталогу пакета SDK для Android в поле Расположение пакета SDK для Android. Вы можете перейти к расположению пакета SDK для Android в проводнике, скопировать путь из адресной строки и вставить этот путь в поле Расположение пакета SDK для Android. Например, если расположение пакет SDK для Android находится на к:\усерс\усернаме\аппдата\локал\андроид\сдк, очистите старый путь в поле Расположение пакет SDK для Android , вставьте этот путь и нажмите кнопку ОК.

в Visual Studio для Mac перейдите к параметрам проекты > расположение пакета SDK для > Android. На странице Android перейдите на вкладку Расположения, чтобы просмотреть и задать расположение пакета SDK:

Расположение по умолчанию для каждого пути выглядит следующим образом:

Расположение пакета SDK для Android

Расположение пакета Android NDK:

Расположение пакета SDK для Java (JDK):

/usr

Обратите внимание, что номер версии NDK может отличаться. Например, вместо android-ndk-r14b может быть более ранняя версия, например android-ndk-r10e.

Чтобы задать расположение пакета SDK для Android, введите полный путь к каталогу пакета SDK для Android в поле Расположение пакета SDK для Android. Можно выбрать папку пакет SDK для Android в Finder, нажать клавиши CTRL + ⌘ + I , чтобы просмотреть сведения о папке, щелкнуть и перетащить путь справа от раздела :, скопировать, а затем вставить его в поле Расположение пакет SDK для Android на вкладке расположения . Например, если расположение пакет SDK для Android находится в папке

/либрари/девелопер/андроид/СДК, очистите старый путь в поле Расположение пакет SDK для Android , вставьте этот путь и нажмите кнопку ОК.

Источник

Where can I set my Android SDK locations?

In Visual Studio, navigate to Tools > Options > Xamarin > Android Settings to view and set the Android SDK location:

The default location for each path is as follows:

Java Development Kit Location:

C:\Program Files\Java\jdk1.8.0_131

Android SDK Location:

C:\Program Files (x86)\Android\android-sdk

Android NDK Location:

C:\ProgramData\Microsoft\AndroidNDK64\android-ndk-r13b

Note that the version number of the NDK may vary. For example, instead of android-ndk-r13b, it could be an earlier version such as android-ndk-r10e.

To set the Android SDK location, enter the full path of the Android SDK directory into the Android SDK Location box. You can navigate to the Android SDK location in File Explorer, copy the path from the address bar, and paste this path into the Android SDK Location box. For example, if your Android SDK location is at C:\Users\username\AppData\Local\Android\Sdk, clear the old path in the Android SDK Location box, paste in this path, and click OK.

In Visual Studio for Mac, navigate to Preferences > Projects > SDK Locations > Android. In the Android page, click the Locations tab to view and set the SDK location:

The default location for each path is as follows:

Android SDK Location:

Android NDK Location:

Java SDK (JDK) Location:

/usr

Note that the version number of the NDK may vary. For example, instead of android-ndk-r14b, it could be an earlier version such as android-ndk-r10e.

To set the Android SDK location, enter the full path of the Android SDK directory into the Android SDK Location box. You can select the Android SDK folder in the Finder, press CTRL+⌘+I to view folder info, click and drag the path to the right of Where:, copy, then paste it to the Android SDK Location box in the Locations tab. For example, if your Android SDK location is at

/Library/Developer/Android/Sdk, clear the old path in the Android SDK Location box, paste in this path, and click OK.

Источник

How To Set Android SDK Path In Windows And Mac

After you installed android studio, you still need to configure some android SDK environment variables then you can use it easily. This article will tell you how to correctly configure Android SDK environment variables such as ANDROID_HOME, PATH on Windows and macOS.

1. Configure Android SDK Variable In Windows.

1.1 Get Android SDK Install Directory Path.

Before you can configure it, you should first get the android SDK install directory follow below steps.

  1. Open android studio, click File —> Settings menu item in the top men bar.
  2. Expand Appearance & Behavior —>System Settings —>Android SDK menu item on the left side of the popup window. Then you can find the Android SDK Location directory path on the right side ( in this example, the Android SDK location path is C:\Users\Jerry\AppData\Local\Android\Sdk ), remember it.

1.2 Set %ANDROID_HOME% and %Path% System Environment Variable.

  1. Right-click the computer icon in Windows file explorer left side, click Properties menu item in the popup menu list. This will open the windows system configuration window.
  2. Click the Advanced system settings link on left panel, it will popup the System Properties window, click the Environment Variables button to open Environment Variables window.
  3. Click the New… button to add a new system variable, input ANDROID_HOME as the variable name, and input the Android SDK location directory path ( such as C:\Users\Administrator\AppData\Local\Android\Sdk ) as the variable value.
  4. Select variable Path and click Edit button and add ;%ANDROID_HOME%\tools;%ANDROID_HOME%\tools\bin;%ANDROID_HOME%\platform-tools at the end of its value. Please note the ; must be English character otherwise it will not take effect .
  5. Click OK to close the system environment variables settings window, open a dos window, type command adb in it. If you see output like below that means the android SDK path variable has been configured successfully.

2. Configure Android SDK Variable In macOS.

  1. Open Android Studio on macOS, then click Android Studio —> Preferences menu item at the left top toolbar.
  2. Input search keyword sdk in the search box of the popup Preferences dialog window left side.
  3. It will focus on the Android SDK menu item on the left side, and you can get the Android SDK Location directory path value on the right side Android SDK Location text box.
  4. Generally, the Android SDK is installed in the /Users/user-name/Library/Android/sdk folder on macOS.
  5. If you can not find the above folder in macOS finder or terminal, this is because the Library folder is a hidden folder by default, you should make the hidden folder visible by executing the command $ defaults write com. apple . finder AppleShowAllFiles TRUE in a macOS terminal window ( please read article How To Show Hidden Files In Mac OS Finder And Select Hidden Files In Html Upload File Form ).
  6. You can also see the hidden Library folder by opening a macOS Finder window, then click Go —> Go to Folder… menu item, and input

/Library in the popup dialog input text box, then click Go button.

  • This is also another method to show the hidden Library folder, open a macOS Finder window, click Go —> Home menu item. Right-click the home folder, then click the Show View Options menu item in the popup menu list. Check the Show Library Folder checkbox.
  • Use nano to create or edit user bash profile in user home directory.
  • Add ANDROID_HOME and PATH environment variable in user bash profile.
  • Make the added system environment take effect.
  • Now open a terminal and run adb, you should also see something output like in windows.
  • Источник

    Читайте также:  Куда удаляет смс андроид
    Оцените статью