Android Studio path to different directories

17,461

Solution 1

Replace your idea.properties with the give below and check

idea.properties

# Use ${idea.home} macro to specify location relative to IDE installation home.
# Use ${xxx} where xxx is any Java property (including defined in previous lines of this file) to refer to its value.
# Note for Windows users: please make sure you're using forward slashes (e.g. c:/idea/system).

#---------------------------------------------------------------------
# Uncomment this option if you want to customize path to IDE config folder. Make sure you're using forward slashes.
#---------------------------------------------------------------------
# idea.config.path=${user.home}/.AndroidStudioPreview/config

 idea.config.path=D:/Android/.AndroidStudioPreview/config

#---------------------------------------------------------------------
# Uncomment this option if you want to customize path to IDE system folder. Make sure you're using forward slashes.
#---------------------------------------------------------------------
idea.system.path=D:/Android/.AndroidStudioPreview/system

#---------------------------------------------------------------------
# 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

#---------------------------------------------------------------------
# Maximum file size (kilobytes) IDE should provide code assistance for.
# The larger file is the slower its editor works and higher overall system memory requirements are
# if code assistance is enabled. Remove this property or set to very large number if you need
# code assistance for any files available regardless their size.
#---------------------------------------------------------------------
idea.max.intellisense.filesize=2500

#---------------------------------------------------------------------
# This option controls console cyclic buffer: keeps the console output size not higher than the specified buffer size (Kb).
# Older lines are deleted. In order to disable cycle buffer use idea.cycle.buffer.size=disabled
#---------------------------------------------------------------------
idea.cycle.buffer.size=1024

#---------------------------------------------------------------------
# Configure if a special launcher should be used when running processes from within IDE.
# Using Launcher enables "soft exit" and "thread dump" features
#---------------------------------------------------------------------
idea.no.launcher=false

#---------------------------------------------------------------------
# To avoid too long classpath
#---------------------------------------------------------------------
idea.dynamic.classpath=false

#---------------------------------------------------------------------
# Uncomment this property to prevent IDE from throwing ProcessCanceledException when user activity
# detected. This option is only useful for plugin developers, while debugging PSI related activities
# performed in background error analysis thread.
# DO NOT UNCOMMENT THIS UNLESS YOU'RE DEBUGGING IDE ITSELF. Significant slowdowns and lockups will happen otherwise.
#---------------------------------------------------------------------
#idea.ProcessCanceledException=disabled

#---------------------------------------------------------------------
# There are two possible values of idea.popup.weight property: "heavy" and "medium".
# If you have WM configured as "Focus follows mouse with Auto Raise" then you have to
# set this property to "medium". It prevents problems with popup menus on some
# configurations.
#---------------------------------------------------------------------
idea.popup.weight=heavy

#---------------------------------------------------------------------
# Use default anti-aliasing in system, i.e. override value of "Settings|Editor|Appearance|Use anti-aliased font"
# option. May be useful when using Windows Remote Desktop Connection for instance.
#---------------------------------------------------------------------
idea.use.default.antialiasing.in.editor=false

#---------------------------------------------------------------------
# Disabling this property may lead to visual glitches like blinking and fail to repaint
# on certain display adapter cards.
#---------------------------------------------------------------------
sun.java2d.noddraw=true

#---------------------------------------------------------------------
# Removing this property may lead to editor performance degradation under Windows.
#---------------------------------------------------------------------
sun.java2d.d3d=false

#---------------------------------------------------------------------
# Workaround for slow scrolling in JDK6
#---------------------------------------------------------------------
swing.bufferPerWindow=false

#---------------------------------------------------------------------
# Removing this property may lead to editor performance degradation under X Window.
#---------------------------------------------------------------------
sun.java2d.pmoffscreen=false

#---------------------------------------------------------------------
# Workaround to avoid long hangs while accessing clipboard under Mac OS X.
#---------------------------------------------------------------------
#ide.mac.useNativeClipboard=True

#---------------------------------------------------------------------
# Maximum size (kilobytes) IDEA will load for showing past file contents -
# in Show Diff or when calculating Digest Diff
#---------------------------------------------------------------------
#idea.max.vcs.loaded.size.kb=20480
#---------------------------------------------------------------------
# IDEA can copy library .jar files to prevent their locking.
# By default this behavior is enabled on Windows and disabled on other platforms.
# Uncomment this property to override.
#---------------------------------------------------------------------
# idea.jars.nocopy=false

#---------------------------------------------------------------------
# The VM option value to be used to start a JVM in debug mode.
# Some JREs define it in a different way (-XXdebug in Oracle VM)
#---------------------------------------------------------------------
idea.xdebug.key=-Xdebug

#-----------------------------------------------------------------------
# Change to 'disabled' if you don't want to receive instant visual notifications
# about fatal errors that happen to an IDE or plugins installed.
#-----------------------------------------------------------------------
idea.fatal.error.notification=enabled

Try this path in your File Explorer as well once to cross check whether the path is correct or not.

D:\Android\.AndroidStudioPreview\config

Solution 2

Since Android Studio 1.4 you don't need to override system's idea.properties. You can create your idea.properties with only that overrides, that you need.

For me, it is:

idea.properties at %USERPROFILE%\.{FOLDER_NAME}\idea.properties

idea.config.path=d:/Android/AndroidStudio/config/
idea.system.path=d:/Android/AndroidStudio/system/

You can read full instruction by Google at http://tools.android.com/tech-docs/configuration

EDIT:
File idea.properties at %USERPROFILE%\.{FOLDER_NAME}\ is not created automaticcaly. You need to create it manually.

Share:
17,461
SonneXo
Author by

SonneXo

Updated on June 27, 2022

Comments

  • SonneXo
    SonneXo about 2 years

    Today I wanted to clean my SSD on which Windows is installed, and I found under C:\Users\SonneXo a folder (1.6 GB), which I wanted to change: .AndroidStudioPreview I searched for it, and the internet suggested me to change the settings in idea.properties, which I did:

    #---------------------------------------------------------------------
    # Uncomment this option if you want to customize path to IDE config folder. Make sure you're using forward slashes.
    #---------------------------------------------------------------------
    D:/Android/.AndroidStudioPreview/config
    
    #---------------------------------------------------------------------
    # Uncomment this option if you want to customize path to IDE system folder. Make sure you're using forward slashes.
    #---------------------------------------------------------------------
    D:/Android/.AndroidStudioPreview/system
    

    I copied the complete folder from C:\Users\SonneXo.AndroidStudioPreview to D:\Android.AndroidStudioPreview, I started Android Studio and it told me I should import settings to complete the installation.

    So I guess something didnt went right. Same appeared as I removed the # from the instroductions, too.

    If I dont choose a folder with the settings to import, the sdk creates the .AndroidStudioPreview folder new, if I choose the new location, it seems to copy parts of it back to C:\Users\SonneXo.

    Someone out there with the same problem and a suggestion?

    So far have a nice sunday ;D

  • Piyush Agarwal
    Piyush Agarwal over 10 years
    great enjoy friend :)
  • jiggunjer
    jiggunjer over 8 years
    The information in that link is not accurate for android 1.4. When starting android studio there are only 2 folders created at %USERPROFILE%\.{FOLDER_NAME}`, namely system and config. There is no local idea.properties file and the one under bin\ in the install directory only contains 2 lines of code. So what must one modify to change the location of these local folders?
  • jiggunjer
    jiggunjer over 8 years
    Doesn't work for AndroidStudio1.4 on windows, will probably need a registry edit to stop the application from constantly creating a .AndroidStudio1.4 folder in the user home directory.
  • Artem Mostyaev
    Artem Mostyaev over 8 years
    Oh, sorry, forgot to say. I've created idea.properties file manually.
  • Piyush Agarwal
    Piyush Agarwal over 8 years
    Not sure, did not try.
  • T.Todua
    T.Todua over 7 years
    Huge time I've spent trying to find out method to change config folder and found. THANKS!
  • Piyush Agarwal
    Piyush Agarwal over 7 years
    @T.Todua Good to know that it helped you.
  • T.Todua
    T.Todua over 7 years
    unfortunately, it was early message. After hours spent, I couldnt do it still .. Finally, I returned the folders back to C: :(