当我从Android Studio打开Android SDK管理器时,SDK路径显示为:
\android-studio\sdk
我想改变这条路径。我该怎么做?
当我从Android Studio打开Android SDK管理器时,SDK路径显示为:
\android-studio\sdk
我想改变这条路径。我该怎么做?
当前回答
当我在Android Studio 3.1.4上遇到这个问题时,解决方案是进入我的项目上的应用程序下拉菜单,然后编辑配置>默认> JAR应用程序,在初始配置选项卡上有一个JRE框。将其设置为JRE路径为我解决了这个问题。
其他回答
从回答来看,我猜人们没有理解你的问题……如果我是正确的,你想要有~\Desktop\github\然后改变SDK的位置不是你所追求的。
来自Android Studio 3.2.1: 在新项目对话框中,选择 配置—>首选项—>工具—>终端—>开始目录
将您想要作为项目默认值的文件夹放在该字段中。
我的设置为 ~ /桌面/ github / 因为我所有的工作都完成了 ~ /桌面/ github /
我注意到最新版本的Android Studio似乎没有在许多答案中提到的“sdk”路径选项。我猜它在某个更新中消失了,在某个地方?
我解决这个问题的方法(osx)是:
转到项目设置(Cmd +;) 在SDK Location中,确保你指向正确的SDK位置(通常是/Applications/Android Studio.app/ SDK),然后点击应用 最重要的一步——点击“同步项目与Gradle文件”
我没有做第三步,这让我很困惑。一次同步后,你所有的源r都属于我们....
去看看 (主菜单)文件>“同步项目与Gradle文件” 点击确定弹出窗口,它将改变你的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应该可以解决这个问题。
点击文件菜单。 选择项目结构。 在“SDK Location”文本框中编辑路径。 从下次Android Studio将使用此位置为您的所有项目。
注意:避免在路径中有空格,因为它有时可能会导致问题。