浅谈Android Studio 4.1 更新内容
作者:张可_ 时间:2021-09-17 11:27:30
概览
Android Studio 4.1 目前已经发布,该版本共修复了2370 个 bug 以及 275 个 issue,主要包含如下新增功能:
设计
Material Design 组件库的更新
开发
Database Inspector 功能
直接在 Android Studio 中运行模拟器
Dagger 导航支持
使用 TensorFlow Lite 模型
构建与测试
Android 模拟器支持折叠屏
Apply Changes 更新
从 AAR 中导出 C/C++ 中的依赖
Native crash 上报符号化
优化
System Trace UI 优化
独立 profilers
Native Memory Profiler
Database Inspector
Database Inspector 功能用来更方便的查看应用程序的数据库。首先保证应用程序运行 API >= 26,然后选择 View -> Tool Windows -> Database Inspector 即可查看或修改数据库。
直接在 Android Studio 中运行模拟器
以前的模拟器必须在独立的窗口中运行,现在可以直接在 Android Studio 中运行模拟器,可以在 Files->Setting->Tools->Emulator 中启用该功能。
Dagger 导航支持
Dagger 是 Android 上流行的依赖注入库,AS 对此也提供了 Find Usages 功能,使在Dagger相关代码之间导航变得更加容易。
Android 模拟器支持折叠屏
除了最近添加的 5G 蜂窝测试外,还添加了对 Android 模拟器的可折叠设备的支持。使用 30.0.26 及更高版本的模拟器将支持此功能。
从 AAR 中导出 C/C++ 中的依赖
Android Gradle Plugin 4.0 添加了在 AAR 依赖项中导入 Prefab 功能。现在 AGP4.1 版本启用了从 AAR 中导出依赖库功能,在模块的build.gradle
文件中添加如下代码导出 native libraries:
buildFeatures {
prefabPublishing true
}
prefab {
mylibrary {
headers "src/main/cpp/mylibrary/include"
}
myotherlibrary {
headers "src/main/cpp/myotherlibrary/include"
}
}
System Trace UI
使用选择框更轻易的选择 traces:
摘要选项卡:分析面板中新的摘要选项卡显示:
汇总特定事件的所有发生次数的统计信息,例如发生次数和最小/最大持续时间。
跟踪选定事件的事件统计信息。
有关线程状态分布的数据。
所选跟踪事件的运行时间最长的事件。
独立的 Profilers
Android Studio Profilers 现在可以独立于 Android Studio 使用,运行前需要确保系统尚未运行别的 Profilers。
Windows/Linux:<studio-installation-folder>\bin
macOS:<studio-installation-folder>/Contents/bin
然后运行 profiler.exe 或 profiler.sh 即可。
Native Memory Profiler
Android Studio Memory Profiler 现在包括一个 Native Memory Profiler,用于将应用程序部署到运行 Android 10 或更高版本的物理设备。通过点击 Record native allocations 开始记录。
来源:https://blog.csdn.net/u013872857/article/details/109045686
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
Android中实现GPS定位的简单例子
Spring基于AspectJ的AOP开发案例解析
Java中final修饰的方法是否可以被重写示例详解
Java中Validated、Valid 、Validator区别详解
自定义Spring Security的身份验证失败处理方法
Android编程设计模式之原型模式实例详解
![](https://img.aspxhome.com/file/2023/1/128951_0s.png)
Android拍照或从图库选择图片并裁剪
Flutter 状态管理的实现
![](https://img.aspxhome.com/file/2023/0/108330_0s.png)
JAVA十大排序算法之桶排序详解
![](https://img.aspxhome.com/file/2023/8/66678_0s.png)
Springboot处理配置CORS跨域请求时碰到的坑
![](https://img.aspxhome.com/file/2023/3/95983_0s.png)
c# 遍历获取所有文件的示例代码
应用启动数据初始化接口CommandLineRunner和Application详解
![](https://img.aspxhome.com/file/2023/8/65608_0s.jpg)
Docker环境下Spring Boot应用内存飙升分析与解决场景分析
![](https://img.aspxhome.com/file/2023/5/119795_0s.jpg)
Java截取字符串的方法
spring boot 注入 property的三种方式(推荐)
Android自定义View实现五子棋游戏
![](https://img.aspxhome.com/file/2023/4/126684_0s.gif)
详解Android Handler的使用
![](https://img.aspxhome.com/file/2023/4/137514_0s.jpg)
Android百度地图应用开发基础知识
![](https://img.aspxhome.com/file/2023/9/138409_0s.png)
Java针对ArrayList自定义排序的2种实现方法
C#设置MDI子窗体只能弹出一个的方法
![](https://img.aspxhome.com/file/2023/3/98273_0s.png)