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

\android-studio\sdk

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


当前回答

在windows中按ctrl+shift+alt+s,这将打开项目属性,在那里你可以找到第一个名为SDK位置的选项单击它,在那里你可以改变SDK路径,JDK路径和NDK路径也

其他回答

尤利卡:我找到了!

在当前的Studio 1.3中,每个项目都有一个本地。属性文件,你可以编辑SDK!

对于Android Studio 3.1.2:

工具>> SDK管理器>>编辑“Android SDK位置”到新位置

之后,将环境变量$ANDROID_HOME设置为新的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 3.1.4上遇到这个问题时,解决方案是进入我的项目上的应用程序下拉菜单,然后编辑配置>默认> JAR应用程序,在初始配置选项卡上有一个JRE框。将其设置为JRE路径为我解决了这个问题。

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

快乐的编码…:)