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!
To delete all Android Studio settings files, go to your user folder in the file manager that is C:\Users\Your_UserName or you can simply search %USERPROFILE% in window start and press Enter to reach there. In this directory delete .
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 closing Android 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 on My Computer > Properties > Advanced System Settings > Environment Variables
and create a new environment variable named ANDROID_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.
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 closing Android 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 on My Computer > Properties > Advanced System Settings > Environment Variables
and create a new environment variable named GRADLE_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.
How to move data from %UserProfile%
The folders will still remain under %UserProfile%, but not the data.
Add Environment Variable
Create "System variable":
Variable name: ANDROID_SDK_HOME
Variable value: D:\Android
This is a example with Android Studio version 3.1
Edit file with:
idea.config.path=D:/Android/.AndroidStudio3.1/config
idea.system.path=D:/Android/.AndroidStudio3.1/system
The file "idea.properties" is located under:
%UserProfile%/.AndroidStudio3.1/config
Close Android Studio
Don't edit "Android Studio/bin/idea.properties". When updating Android Studio this file is cleared.
Change "Service directory path" to:
D:/Android/.gradle
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With