工欲善其事,必先利其器。

虽然项目能跑了,但是诸多不爽也接踵而至,本篇总结如何让as更顺手。

Gradle Build Running 慢 很慢 特别慢

无论多么小的项目,每次启动都要花费很长时间Gradle Build Running。
解决:
1、在C:\User<用户名>.gradle 目录下新建一个gradle.properties文件,并在里面添加一行

org.gradle.daemon=true

2、打开Settings,设置Gradle的工作模式为offline,如下图:
AndroidStudio-3.2.1 环境搭建之优化设置

plugins搜索不到插件

以下两种方法任君尝试:
1、点击按钮"HTTP Proxy Settings…" 在"HTTP Proxy "界面选择 No proxy,重启as。
AndroidStudio-3.2.1 环境搭建之优化设置
2、点击File | Settings | Appearance & Behavior | System Settings | Updates,取消 Use secure connection,重启as。
AndroidStudio-3.2.1 环境搭建之优化设置

自动快速生成控件代码 - findViewByMe

在布局文件中添加完各类控件后,还要到java代码里写各种定义,很麻烦。推荐一个自动代码插件-findViewByMe。可以到Settings | Plugins | Browse repositories|中搜索并安装。
安装后,在布局文件(xml)中,右键,选择findViewByMe in XML,可以复制自动生成的代码到java文件中。
AndroidStudio-3.2.1 环境搭建之优化设置

相关文章:

  • 2021-09-16
  • 2021-04-15
  • 2021-08-17
  • 2021-04-10
  • 2021-06-04
  • 2021-04-27
  • 2021-04-26
  • 2021-08-12
猜你喜欢
  • 2022-12-23
  • 2021-08-05
  • 2022-12-23
  • 2022-12-23
  • 2021-07-05
  • 2022-12-23
  • 2021-12-29
相关资源
相似解决方案