当我从Android Studio打开Android SDK管理器时,SDK路径显示为:

\android-studio\sdk

我想改变这条路径。我该怎么做?


当前回答

当我在Android Studio 3.1.4上遇到这个问题时,解决方案是进入我的项目上的应用程序下拉菜单,然后编辑配置>默认> JAR应用程序,在初始配置选项卡上有一个JRE框。将其设置为JRE路径为我解决了这个问题。

其他回答

goto菜单文件->项目结构或按Ctrl + Alt + Shift + S

例如http://how-to-android-studio.blogspot.com/2014/11/set-sdk-location.html

我这样配置

on

欢迎来到Android Studio Screen

单击“配置然后”

项目默认值,然后是项目结构

然后 Android SDK和选择到我当前位置的Android SDK的路径

尝试这种方式,我尝试在Android Studio 2.0 步骤1:File->Settings 步骤2:设置->SDK选项 第三步:单击Sdk Location中的Edit选项 步骤4:显示“SDK组件设置” 第五步:在“SDK组件向导”中点击三个“…” 步骤6:选择新的SDK路径

下面是如何在android studio中更改android sdk路径:

Open your required android project in Android studio Click on the main project folder and press F4 Now click on "SDKs" under Platform Settings (Left hand side of the dialog box) You should now see a plus sign on the top, click it and choose "Android SDK" Now you would be asked to choose the required SDK folder Select the required build target(if necessary) and click "ok" Now you should see the new entry in the list of SDKs Click "Modules" under Project Settings Select your project folder and in the Dropdown for "Module SDK", select the new SDK entry and click "apply" Now click "OK" and your done.

注意:如果更改没有生效,重新启动android studio应该可以解决这个问题。

上面的答案是非常正确的,但有时Android Studio,不喜欢刷新后的SDK路径改变,一个快速的解决方案是做一些改变在你的构建文件,并点击同步。它会刷新你的项目。

快乐的编码…:)