Android Studio:默认项目目录 [英] Android Studio: Default project directory

查看:106
本文介绍了Android Studio:默认项目目录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

每当我在 Android Studio 中创建一个新项目时,它都想将它放在一个通用默认文件夹中的某个位置(取决于操作系统 - 此处为 Ubuntu):

Whenever I create a new project in Android Studio it wants to put it in a generic default folder at a location something similar to (dependent on OS - Ubuntu here):

/home/USER/AndroidStudioProjects/

我想将此目录更改为其他位置.除了在创建每个项目时选择这个新位置之外,是否有一个设置(找不到)或 path 变量(找不到任何文档)可以设置这个目录(比如 /home/USER/Projects/AndroidStudio/) 作为默认值?

I want to change this directory to another location. Besides selecting this new location on the creation of every project, is there a setting (couldn't find) or path variable (couldn't find any documentation) that can set this directory (say /home/USER/Projects/AndroidStudio/) as the default?

我正在寻找类似于在 Eclipse 中更改工作区的东西.

Something similar to changing the workspace in Eclipse is what I am looking for.

推荐答案

在某些时候我也尝试过这样做,但 Android Studio 不像 Eclipse 那样工作.

At some point I too tried to do this, but the Android Studio doesn’t work quite like Eclipse does.

这更简单:如果您在 /home/USER/Projects/AndroidStudio/MyApplication 处创建项目,那么所有新项目将默认为 /home/USER/Projects/AndroidStudio.

It's simpler: if you create a project at, say /home/USER/Projects/AndroidStudio/MyApplication from there on all new projects will default to /home/USER/Projects/AndroidStudio.

您还可以编辑 ~/.AndroidStudioPreview/config/options/ide.general.xml(在 linux 中)并更改读取 <option name="lastProjectLocation" 值的行="$USER_HOME$/AndroidStudioProjects"/><option name="lastProjectLocation" value="$USER_HOME$/Projects/AndroidStudio"/>,但请注意一旦您在其他任何地方创建项目,该位置就会更改为该位置,并且所有新项目都将默认为该位置.

You can also edit ~/.AndroidStudioPreview/config/options/ide.general.xml (in linux) and change the line that reads <option name="lastProjectLocation" value="$USER_HOME$/AndroidStudioProjects" /> to <option name="lastProjectLocation" value="$USER_HOME$/Projects/AndroidStudio" />, but be aware that as soon as you create a project anywhere else this will change to that place and all new projects will default to it.

希望这会有所帮助,但事实是,除了我在此处解释的内容之外,实际上并没有更多内容.

Hope this helps, but the truth is there really isn't much more to it other than what I explained here.

如果您需要其他任何东西,请告诉我.

Let me know if you need anything else.

这篇关于Android Studio:默认项目目录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆