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

参考

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值