美文网首页
Android Studio User目录缓存搬移到指定目录

Android Studio User目录缓存搬移到指定目录

作者: curryLiang | 来源:发表于2019-10-19 18:25 被阅读0次

User目录下主要存在三个文件
1、.android是Android SDK配置模拟器生成的,一般不用模拟器,子目录avd为空,不需要处理。
2、.AndroidStudio需要去AS安装目录下bin目录下的idea.properties文件中指定一下两项配置:
idea.config.path=/your/path/to/config/path
idea.config.system=/your/path/to/system/path
然后move .AndroidStudio目录到指定目录下,注意先关闭AS。
3、.gradle是gradle的用户目录,首先在gradle的bin目录下的gradle文件中找到

Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script

这句注释,然后在下面加上GRADLE_OPTS=-Dgradle.user.home=/yourpath/gradle/gradle_cache
接着在AS的config->Settings->Gradle->Service Directory Path改成指定的gradle缓存目录即可,最后把.gradle目录move到这个目录下,重新打开工程即可。

相关文章

网友评论

      本文标题:Android Studio User目录缓存搬移到指定目录

      本文链接:https://www.haomeiwen.com/subject/lpsnmctx.html