惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

P
Privacy & Cybersecurity Law Blog
V
V2EX
月光博客
月光博客
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
The Register - Security
The Register - Security
MongoDB | Blog
MongoDB | Blog
P
Privacy International News Feed
The Last Watchdog
The Last Watchdog
Security Archives - TechRepublic
Security Archives - TechRepublic
美团技术团队
Stack Overflow Blog
Stack Overflow Blog
博客园 - 司徒正美
博客园 - 三生石上(FineUI控件)
V
Visual Studio Blog
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
K
Kaspersky official blog
S
Secure Thoughts
T
Tenable Blog
Security Latest
Security Latest
The Cloudflare Blog
S
Security @ Cisco Blogs
H
Heimdal Security Blog
aimingoo的专栏
aimingoo的专栏
TaoSecurity Blog
TaoSecurity Blog
Blog — PlanetScale
Blog — PlanetScale
Microsoft Security Blog
Microsoft Security Blog
Schneier on Security
Schneier on Security
Webroot Blog
Webroot Blog
G
Google Developers Blog
www.infosecurity-magazine.com
www.infosecurity-magazine.com
Scott Helme
Scott Helme
IT之家
IT之家
Latest news
Latest news
The Hacker News
The Hacker News
C
Check Point Blog
T
The Exploit Database - CXSecurity.com
H
Hackread – Cybersecurity News, Data Breaches, AI and More
腾讯CDC
C
CERT Recently Published Vulnerability Notes
NISL@THU
NISL@THU
N
News | PayPal Newsroom
Forbes - Security
Forbes - Security
P
Palo Alto Networks Blog
S
Security Affairs
S
Securelist
Google Online Security Blog
Google Online Security Blog
WordPress大学
WordPress大学
Last Week in AI
Last Week in AI
C
Cybersecurity and Infrastructure Security Agency CISA
A
About on SuperTechFans

Wriprin Blog

🐿️ SAP GUI 账户密码重置「Note」 🧑🏻‍💻 MCU - C51 单片机「实例」 🌳 Linux - tree 生成目录树「Note」 📒 SAP ABAP SY-REPID 变化「Note」 🗂️ SAP 通过 OData Service 反查 CDS View 位置 & 视图「Workaround」 🐌 Android Studio Gradle 无限 Build「假死」 🧑🏻‍💻 Android Studio 开发环境搭建 & 配置 🐌 SAP ALV & 导出 Excel 负号前置「实例」 🍵 Java 调用 SAP RFC 接口「实例」
🤖 Android Studio 默认配置路径修改
Wriprin · 2022-12-08 · via Wriprin Blog

前言

在我们 Android Studio 安装完成后,默认会在 C 盘对应用户目录下生成存储和缓存目录文件,我们需要迁移文件并配置索引路径,使 Android Studio 到新目录读取我们的配置
  • .android:我们在 AVD Manager 中配置的 AVD 就会存储在这里,随便一个 AVD 动辄就 10 G 左右,所以只要不是「仓鼠盘」,一定要修改
  • .AndroidStudio:基本文件和配置文件,包括安装包、源代码、项目文件、库文件等
  • .gradle:包含着 Gradle 的基本文件和配置文件,包括安装包、源代码、插件等,你可能会想这才能占多少,但是实际开发如果涉及导入他人项目的场景,由于 Gradle 版本不一致,每次导入不同项目都要下一个项目对应版本的 Gradle,长久累计,容量不可小觑~

※ 注意:建议迁移任何一个文件之前要打包做好备份,否则操作失误,回退都是问题!


配置系统环境变量 ANDROID_AVD_HOME,并指定到修改后的 AVD 目录

Android-Studio-Default-Path-STAIN-01.png

修改完成后,删除原 C 盘下的对应文件,然后重启电脑,重新打开 AS - AVD Manager,并重新构建一个 AVD,会自动存储到我们刚刚配置的目录中


.AndroidStudio

  • 如果你是旧版本,那么该文件夹很好找
  • 个人使用的版本为 2020.3.1,所以至少在 Android Studio 2020.3.1 后,该文件夹位于下图所示:

Android-Studio-Default-Path-STAIN-02.png

  • 打包备份 AndroidStudio2020.3 文件夹
  • 修改 AS - bin - idea.properties 文件,将路径配置为自定义路径

Android-Studio-Default-Path-STAIN-03.png

此时重新启动 Andorid Studio,会提示导入配置

Android-Studio-Default-Path-STAIN-04.png

  • 原配置目录:C:\Users{CurrentUser}\AppData\Local\Google\AdnroidStudio2020.3
  • 导入原配置后,删除原配置即可
  • 这里可以看到提示修改 pluginslog 目录,我们已经修改过了,所以你们正常不会看见该提示

Android-Studio-Default-Path-STAIN-05.png


.gradle

打包备份原 .gradle 文件夹,然后迁移到自己配置的指定目录

迁移完成后,在 AS 中配置修改 .gradle 默认目录

Android-Studio-Default-Path-STAIN-06.png

至此,所有默认配置已经修改完成

至于 .m2 要不要改看你自己有没有 Maven 本地仓,没有的话可以改一下

Android-Studio-Default-Path-STAIN-07.png

本文链接:https://blog.cnix.cc/index.php/archives/117/