是否可以在其他地方分配这些文件夹? [英] Is it possible to allocate these folders in another place?
问题描述
我正在安装 Android Studio
并且我默认使用路径 C:\Users\Administrator\AppData\Local\Android\sdk
来设置我的 SDK代码>.如果我选择这个选项,一些文件夹会出现在路径
C:\Users\Administrator
上.
这些文件夹是:
.android
.AndroidStudio1.3
.oracle_jre_usage
.gradle
为了更简洁,我尝试将所有这些文件夹包装到另一个文件夹中,但每次运行 Android Studio
时,它都会给我提供重新配置设置的选项.如果我再次配置它们,文件夹将重新出现在路径 C:\Users\Administrator
上.
如何将这些文件夹包装到另一个文件夹中或为它们设置另一个位置并保存设置?
<小时>我在 Rahul Tiwari
提供的答案的博客上证明了解决方案,但我只能得到文件夹 .android
将在新文件夹中.其余文件夹在更改后位于同一位置.
EDIT 2:根据 Rahul Tiwari
提供的博客移动文件夹 .gradle
我更改了 的默认设置Android Studio
:
文件>其他设置... >默认设置... >构建、执行、部署 >摇篮
这里我有服务目录路径: C:/Users/Administrator/AndroidStudio/.gradle
但是文件夹.gradle
仍然出现在路径C:/Users/Administrator
上.
编辑 3: 尝试删除文件夹 .AndroidStudio1.3
我更改了以下几行:
#---------------------------------------------------------------------# 如果要自定义用户安装插件文件夹的路径,请取消注释此选项.确保使用正斜杠.#---------------------------------------------------------------------# idea.plugins.path=${idea.config.path}/plugins#---------------------------------------------------------------------# 如果要自定义 IDE 日志文件夹的路径,请取消注释此选项.确保使用正斜杠.#---------------------------------------------------------------------# idea.log.path=${idea.system.path}/log
到这些:
#---------------------------------------------------------------------# 如果要自定义用户安装插件文件夹的路径,请取消注释此选项.确保使用正斜杠.#---------------------------------------------------------------------idea.plugins.path=${C:/Users/Administrator/AndroidStudio/.AndroidStudio1.3/config}/plugins#---------------------------------------------------------------------# 如果要自定义 IDE 日志文件夹的路径,请取消注释此选项.确保使用正斜杠.#---------------------------------------------------------------------idea.log.path=${C:/Users/Administrator/AndroidStudio/.AndroidStudio1.3/system}/log
但我也无法移动文件夹.
<小时>编辑 4: 这是我之前提到的 博客(非常感谢Rahul Tiwari
).我把它贴在这里是因为他的回答被删除了.
提前致谢!
最后,我找到了移动上面三个文件夹的解决方案.我认为将我面临的问题以及我为解决这些问题所做的更改放在这里可能会很有趣.
我将调查最后一个文件夹 .oracle_jre_usage
,如果我有解决方案,我将完成此答案.看我完成了.gradle
文件夹的解决方案.
移动.android
文件夹
实际上,按照 Rahul Tiwari
提供的博客的步骤,可以移动此文件夹.尽管如此,我还是要把所有的过程都放在这里:
在关闭
Android Studio
(如果它正在运行)后,您必须将.android
文件夹移动到您想要的文件夹将存储,在我的情况下,C:\Users\Administrator\AndroidStudio
.注意新文件夹名称中的空格,它可能会给您带来问题(像我一样).我的意思是,
Android Studio
,New Folder
或类似的.如果您使用的是
Windows
,您可以右键单击我的电脑 >属性 >高级系统设置 >Environment Variables
并创建一个名为ANDROID_SDK_HOME
的新环境变量,您必须将存储.android
文件夹的新路径作为值.它与您在上述步骤中移动.android
文件夹的路径相同.点击确定"按钮接受您的更改.
重新启动
Android Studio
并查看.android
文件夹没有出现在默认路径中.
移动.AndroidStudio1.3
文件夹
使用那个文件夹时我遇到了一些问题,因为我没有注意到一些非常重要的细节.这是我遵循的步骤:
首先,您必须在进行任何更改之前关闭
Android Studio
.之后,您必须将文件夹
.AndroidStudio1.3
移动到您想要存储它的路径.接下来,您必须转到安装
Android Studio
的文件夹并打开idea.properties";文件并将 idea.config.path 和 idea.system.path 出现的行更改为这些文件夹将要位于的新路径.
它们必须与此类似:
idea.config.path=C:/Users/Administrator/AndroidStudio/.AndroidStudio1.3/configidea.system.path=C:/Users/Administrator/AndroidStudio/.AndroidStudio1.3/system
<块引用>
这里我遇到了三个问题,所以请小心:
<块引用>
- 请注意,默认情况下,路径使用
/
而不是\
作为Windows
.
<块引用>
- 不要更改 idea.plugins.path 和 idea.log.path 的值(我的编辑 3).确保您正在更改 idea.config.path 和 idea.system.path 值.
<块引用>
- 取消注释 idea.config.path 和 idea.system.path 出现的行.我的意思是,删除他们在每行开头的
#
.
- 最后一步,重新启动
Android Studio
.
搜索和做一些证明我也得到了移动 .gradle
文件夹的解决方案.步骤与 .android
文件夹相同,但我将所有步骤(带有更改的值)放在这里以避免任何混淆.这是:
移动.gradle
文件夹
在关闭
Android Studio
(如果它正在运行)后,您必须将.gradle
文件夹移动到您想要的文件夹将存储,在我的情况下,C:\Users\Administrator\AndroidStudio\.gradle
.注意新文件夹名称中的空格,它可能会给您带来问题(像我一样).我的意思是,
Android Studio
,New Folder
或类似的.如果您使用的是
Windows
,您可以右键单击我的电脑 >属性 >高级系统设置 >Environment Variables
并创建一个名为GRADLE_USER_HOME
的新环境变量,并且您必须将存储.gradle
文件夹的新路径作为值.它与您在上述步骤中移动.gradle
文件夹的路径相同.点击确定"按钮接受您的更改.
重新启动
Android Studio
并查看.gradle
文件夹没有出现在默认路径中.
I am installing Android Studio
and I have by default the path C:\Users\Administrator\AppData\Local\Android\sdk
to set my SDK
. If I choose this option, some folders appeared on the path C:\Users\Administrator
.
These folders are:
.android
.AndroidStudio1.3
.oracle_jre_usage
.gradle
To be a little more cleaner I tried to wrap all these folders into another folder but each time I run Android Studio
it gives to me the option to configure again the settings. If I configure them again, the folders re-appeared on the path C:\Users\Administrator
.
What can I do to wrap these folders into another one or to set another location for them and that the settings will be saved?
EDIT: I prove the solutions on the blog of the answer provided by Rahul Tiwari
but I only could get that the folder .android
will be in the new folder. The rest folders are at the same location after the changes.
EDIT 2: According to the blog provided by Rahul Tiwari
to move the folder .gradle
I change the default settings of Android Studio
:
File > Other Settings... > Default Settings... > Build, Execution, Deployment > Gradle
Here I have as Service directory path: C:/Users/Administrator/AndroidStudio/.gradle
But the folder .gradle
still appears on the path C:/Users/Administrator
.
EDIT 3: Trying to remove the folder .AndroidStudio1.3
I changed these lines:
#---------------------------------------------------------------------
# Uncomment this option if you want to customize path to user installed plugins folder. Make sure you're using forward slashes.
#---------------------------------------------------------------------
# idea.plugins.path=${idea.config.path}/plugins
#---------------------------------------------------------------------
# Uncomment this option if you want to customize path to IDE logs folder. Make sure you're using forward slashes.
#---------------------------------------------------------------------
# idea.log.path=${idea.system.path}/log
to these:
#---------------------------------------------------------------------
# Uncomment this option if you want to customize path to user installed plugins folder. Make sure you're using forward slashes.
#---------------------------------------------------------------------
idea.plugins.path=${C:/Users/Administrator/AndroidStudio/.AndroidStudio1.3/config}/plugins
#---------------------------------------------------------------------
# Uncomment this option if you want to customize path to IDE logs folder. Make sure you're using forward slashes.
#---------------------------------------------------------------------
idea.log.path=${C:/Users/Administrator/AndroidStudio/.AndroidStudio1.3/system}/log
but I also couldn't move the folder.
EDIT 4: This is the blog that I mention before (Thank you very much Rahul Tiwari
). I post it here because his answer was deleted.
Thanks in advance!
Finally, I got the solution to move three of the folders that I put above. I think it could be interesting to put here the problems that I faced and the changes that I made to solve them.
I'm going to investigate about the last folder, .oracle_jre_usage
, and I will complete this answer if I got a solution for it. Look that I complete the solution for .gradle
folder.
To move .android
folder
Really, following the steps of the blog that Rahul Tiwari
provided, this folder could been moved. Nevertheless I'm going to put here all the process:
You have to move your
.android
folder, after closingAndroid Studio
(if you have it running), to the folder in which you want that it will be stored, in my case,C:\Users\Administrator\AndroidStudio
.BEWARE WITH THE SPACES IN THE NAME OF THE NEW FOLDER, IT COULD GIVE TO YOU PROBLEMS (AS ME). I mean,
Android Studio
,New Folder
or similars.If you are on
Windows
, you can do right-click onMy Computer > Properties > Advanced System Settings > Environment Variables
and create a new environment variable namedANDROID_SDK_HOME
and as value you have to put the new path in which.android
folder will be stored. It's the same path in which you have moved the.android
folder in the step above.Click "OK" button to accept your changes.
Re-launch
Android Studio
and look that the.android
folder doesn't appear in the default path.
To move .AndroidStudio1.3
folder
With that folder I had some problems because I didn't noticed some details that were very important. Here the steps that I followed:
First of all, you have to close
Android Studio
before doing any change.After, you have to move the folder
.AndroidStudio1.3
to the path in which you want that it will be stored.Next, you have to go to the folder in which
Android Studio
were installed and open "idea.properties" file and changed the lines where idea.config.path and idea.system.path appeared for the new path in which these folders are going to be located.
They have to be something similar to this:
idea.config.path=C:/Users/Administrator/AndroidStudio/.AndroidStudio1.3/config
idea.system.path=C:/Users/Administrator/AndroidStudio/.AndroidStudio1.3/system
Here I had three problems so please be careful:
- Notice that the paths are with
/
and not with\
asWindows
put by default.
- DON'T CHANGE the values of idea.plugins.path and idea.log.path (My EDIT 3). Be sure that you are changing idea.config.path and idea.system.path values.
- Uncomment the lines in which idea.config.path and idea.system.path appears. I mean, remove the
#
that they have at the begining of each line.
- The last step, re-launch
Android Studio
.
Searching and doing some proves I also get the solution to move .gradle
folder. The steps are the same as .android
folder but I put here all the steps (with the values that changed) to avoid any confusion. Here it is:
To move .gradle
folder
You have to move your
.gradle
folder, after closingAndroid Studio
(if you have it running), to the folder in which you want that it will be stored, in my case,C:\Users\Administrator\AndroidStudio\.gradle
.BEWARE WITH THE SPACES IN THE NAME OF THE NEW FOLDER, IT COULD GIVE TO YOU PROBLEMS (AS ME). I mean,
Android Studio
,New Folder
or similars.If you are on
Windows
, you can do right-click onMy Computer > Properties > Advanced System Settings > Environment Variables
and create a new environment variable namedGRADLE_USER_HOME
and as value you have to put the new path in which.gradle
folder will be stored. It's the same path in which you have moved the.gradle
folder in the step above.Click "OK" button to accept your changes.
Re-launch
Android Studio
and look that the.gradle
folder doesn't appear in the default path.
这篇关于是否可以在其他地方分配这些文件夹?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!