安装目录
gradle安装目录,即GRADLE_USER_HOME:/Users/louis/.gradle
AndroidStudio安装目录:/Applications/Android\ Studio.app/Contents/bin/studio.vmoptions
创建AVD之前先设置环境变量ANDROID_SDK_HOME,虚拟设备就会保存到其下的.android目录,否则会保存到C盘。
关闭自动格式化代码块
在设置中 Setting\Editor\General\Smart Keys\Reformat block on typing '}' 取消复选。

块内自动缩进但不要重新格式化
首先要保留复选Reformat block on typing '}',然后在Setting\Editor\Code Style\Kotlin\Wrapping and Braces中进行精细化配置一些Do not wrap。

运行调试和构建
- 运行和调试:Run App和Debug App。只区分是运行还是调试,不影响构建、架构。
- 构建:debug或Release,在Build Variants中选择,对应build.gradle中的buildTypes。构建配置中指定把哪些so文件打包。
- 平台架构:运行App的设备,真机或模拟器,对应Running Devices、Avaliable Devices列表中的设备。平台架构决定运行时使用哪些so文件。
Hierarchy Viewer
在Android Studio 3.1及更高版本中,Hierarchy Viewer已被移除。Android Studio团队已经推荐使用Layout Inspector作为替代方案。
在工具栏上,点击“Tools”选项卡。选择“Layout Inspector”。
使用Android Studio的Layout Inspector工具可以直观查看布局层级和测量次数,帮助识别性能瓶颈。
Layout Inspector is embedded in the Running Devices window。Launch or connect a device to start inspecting.
使用插件统计代码行数
安装Statistic插件

7535

被折叠的 条评论
为什么被折叠?



