当我从Android Studio打开Android SDK管理器时,SDK路径显示为:
\android-studio\sdk
我想改变这条路径。我该怎么做?
当我从Android Studio打开Android SDK管理器时,SDK路径显示为:
\android-studio\sdk
我想改变这条路径。我该怎么做?
当前回答
点击——>文件——>关闭当前项目。
Android Studio主页
单击“配置”->项目默认值->项目结构 单击左边栏中的SDK Location并复制路径。 粘贴路径在我的电脑->右键单击->属性->单击高级系统设置->环境变量并更改android主路径。 点击“OK”保存会话。 在路径中添加工具和平台工具并保存更改。 打开命令提示符[window+R],输入adb + enter。
其他回答
从Android Studio 1.0.1
去
文件->项目结构变成项目结构 左-> SDK位置 SDK位置选择Android SDK位置(旧版本使用按+,添加另一个SDK)
当我在Android Studio 3.1.4上遇到这个问题时,解决方案是进入我的项目上的应用程序下拉菜单,然后编辑配置>默认> JAR应用程序,在初始配置选项卡上有一个JRE框。将其设置为JRE路径为我解决了这个问题。
从快速启动窗口中,选择配置,然后选择项目默认值,然后选择项目结构。然后在左侧的“平台设置”中选择“sdk”。然后在右边选择当前的android平台,我的是android 4.2.2平台,使用顶部的红色减号按钮删除它,然后使用顶部的绿色加号按钮添加一个新的android平台,并将其指向当前的SDK文件夹,就是这样。
点击文件菜单。 选择项目结构。 在“SDK Location”文本框中编辑路径。 从下次Android Studio将使用此位置为您的所有项目。
注意:避免在路径中有空格,因为它有时可能会导致问题。
下面是如何在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应该可以解决这个问题。