当我从Android Studio打开Android SDK管理器时,SDK路径显示为:
\android-studio\sdk
我想改变这条路径。我该怎么做?
当我从Android Studio打开Android SDK管理器时,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 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应该可以解决这个问题。
去看看 (主菜单)文件>“同步项目与Gradle文件” 点击确定弹出窗口,它将改变你的SDK目录。
点击文件菜单。 选择项目结构。 在“SDK Location”文本框中编辑路径。 从下次Android Studio将使用此位置为您的所有项目。
注意:避免在路径中有空格,因为它有时可能会导致问题。
尝试这种方式,我尝试在Android Studio 2.0 步骤1:File->Settings 步骤2:设置->SDK选项 第三步:单击Sdk Location中的Edit选项 步骤4:显示“SDK组件设置” 第五步:在“SDK组件向导”中点击三个“…” 步骤6:选择新的SDK路径