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

\android-studio\sdk

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


当前回答

我遇到了同样的问题,但sdk路径指向一个挂载驱动器。我发现,简单地退出Android Studio,卸载设备并重新启动Android Studio会让它询问sdk位置,因为它没有sdk位置(Android Studio Beta 0.8.7)。

因此,我猜如果你只是退出Android Studio,删除\ Android - Studio \sdk或将其移动到其他地方,并再次启动Android Studio,它应该要求sdk的位置以及。

其他回答

从Android Studio 1.0.1

文件->项目结构变成项目结构 左-> SDK位置 SDK位置选择Android SDK位置(旧版本使用按+,添加另一个SDK)

从快速启动窗口中,选择配置,然后选择项目默认值,然后选择项目结构。然后在左侧的“平台设置”中选择“sdk”。然后在右边选择当前的android平台,我的是android 4.2.2平台,使用顶部的红色减号按钮删除它,然后使用顶部的绿色加号按钮添加一个新的android平台,并将其指向当前的SDK文件夹,就是这样。

上面的答案是非常正确的,但有时Android Studio,不喜欢刷新后的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_HOME(在Windows中)到Android SDK的位置,Android Studio将使用它。