Android Studio not letting me change SDK Location

馋奶兔 提交于 2019-12-12 11:27:42

问题


I open up Android Studio. Then I open up SDK manager. I have the most up to date version but, I need Android 6.0 for my SDK platform. It doesn't even let me click anything.

In this image you can see the text and check boxes are discolored. I can't click anything inside the SDK Platform, or even the the Tools and update sites. I can't check the box "Show Package Details". You can see a screenshot bellow.

I have installed and changed it sucessfully on another laptop of mine, but I can't get it to work here.


回答1:


Your sdk path has problem.The sdk path you provided has whitespace.Remove that and reset path again.Rename your path to remove whitespace.set something like "C:\Users\Tarique_Shams\AppData\Local\Android\sdk".




回答2:


  1. Open Command Prompt
  2. Switch to users directory - cd c:\users
  3. Type dir /x and hit Enter
  4. See the short name for your user directory "Tarique Shams"

Example of where you'll see it (highlighted in yellow are the short names for directories with white spaces in the name):

  1. For your directory "Tarique Shams" it should be TARIQU~1 (But, cross check with the dir /x command)
  2. Replace "Tarique Shams" in the path with TARIQU~1
  3. Save! You are good to go now.

In short: Your path should be something like this:

C:\Users\TARIQU~1\AppData\Local\Android\Sdk




回答3:


The problem was I had a white space in my SDK location. To solver it you can change folder name as DKThakur mentioned. In my case I couldn't because it was a User Account. I then tried solving it by using the short name as AndroidMechanic posted. I ran into some complications and just ended up reinstalling Android Studio and the SDK completely after deleting it completely from my computer including and local data. I installed it in another folder with no white spaces. Both DKThakur and AndroidMechanic posted solutions that work, but this is how I did it.

Here is a link to another post of how to completely develet android studio and sdk from your machine: How to completely uninstall Android Studio from windows(v10)? .



来源:https://stackoverflow.com/questions/43229222/android-studio-not-letting-me-change-sdk-location

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!