android studio默认路径配置

配置方法

注意:路径分割需要用斜线符号/分割
  1. 假设Android Studio的根目录位于D:/Android目录下
  2. 打开Android Studio/bin目录下的idea.properties文件
  3. 在文件的开头添加自定义变量:android.studio.home=D:/Android
  4. 设置ANDROID_SDK_HOME环境变量:ANDROID_SDK_HOME=${android.studio.home}
    • 该变量将影响android虚拟机的默认安装位置
  5. 设置gradle路径:gradle.user.home=${android.studio.home}/.gradle
    • 将变量会影响.gradle目录的默认位置
  6. 设置其他路径:将文件中 ${user.home}${android.studio.home} 代替,并取消前面的注释
    • 将影响android studio的一些行为的路径,如设置缓存日志等的目录。

修改部分实例

#---------------------------------------------------------------------
# Android Studio user home path, user defined variable
#---------------------------------------------------------------------
android.studio.home=D:/Android

#---------------------------------------------------------------------
# .android avd path
# Official environment variable, can be setting in system environment path
#---------------------------------------------------------------------
ANDROID_SDK_HOME=${android.studio.home}

#---------------------------------------------------------------------
# .gradle path
# official setting variable
#---------------------------------------------------------------------
gradle.user.home=${android.studio.home}/.gradle

#---------------------------------------------------------------------
# Uncomment this option if you want to customize a path to the settings directory.
#---------------------------------------------------------------------
# idea.config.path=${user.home}/.AndroidStudio/config
idea.config.path=${android.studio.home}/.AndroidStudio/config

#---------------------------------------------------------------------
# Uncomment this option if you want to customize a path to the caches directory.
#---------------------------------------------------------------------
# idea.system.path=${user.home}/.AndroidStudio/system
idea.system.path=${android.studio.home}/.AndroidStudio/system

#---------------------------------------------------------------------
# Uncomment this option if you want to customize a path to the user-installed plugins directory.
#---------------------------------------------------------------------
# idea.plugins.path=${idea.config.path}/plugins
idea.plugins.path=${idea.config.path}/plugins

#---------------------------------------------------------------------
# Uncomment this option if you want to customize a path to the logs directory.
#---------------------------------------------------------------------
# idea.log.path=${idea.system.path}/log
idea.log.path=${idea.system.path}/log

参考

猜你喜欢

转载自blog.csdn.net/qq_16740151/article/details/129967418