Material Design Components: Updated themes and styles in new project templates
在 Android Studio 的 Create New Project 对话框中的项目模板现在开始使用Material Design Components (MDC) ,默认情况下遵循最新的主题和样式指南,更新包括:
- MDC: 在项目的
build.gradle
文件内添加了com.google.android.material:material
依赖。应用的 Base themes 使用Theme.MaterialComponents.*
作为父主题,并且会覆盖更新后的 MDC color 和一些设置为 “on” 的属性. - Color resources: 在
colors.xml
文件中的颜色资源使用字面意思来命名(比如:用purple_500
替换colorPrimary
). - Theme resources: 主题资源被放在了
themes.xml
文件 (替换原来的styles.xml
文件),并且使用Theme.<ApplicationName>
来命名. - Dark theme: 应用的基础主题使用
DayNight
作为父主题,并被分为res/values
和res/values-night
. - Theme attributes: 颜色资源在布局和样式中被引用为主题属性(比如 :
?attr/colorPrimary
) ,以避免硬编码颜色
Prevent new and existing databases from closing
如果您的应用程序经常与数据库连接或断开连接,那么检查这些数据库就会很困难。 这是因为检查、查询和修改数据库需要您的应用程序保持与数据库的实时连接。 “数据库检查器”窗口使用图标帮助您识别打开()和关闭(
)数据库。
为了更容易地检查这些数据库,可以通过单击“保持数据库连接处于打开状态”来防止与数据库的新连接和现有连接关闭。启用此行为后,“保持数据库连接打开”按钮将更改为
。
本次更新修的 Bug
Android Gradle Plugin
- Issue #154388196: Gradle configuration fails on project with several modules when AGP is applied using plugin management
- Issue #155318103: Post-tasks variant API: Adding manifest placeholders is broken and breaks the build from AGP 3.x to AGP 4.1.0-alpha08
- Issue #145944388: Compile error because R.java limit (error: too many constants)
C++ Debugger
- Issue #120865679: App crash (segfault) when debugging JNI functions with local jstring reference
Code Analysis
- Issue #155772516: Resource bundle redefinition for plugin 'org.jetbrains.android'. Old value: messages.AndroidBundle
Database Inspector
- Issue #156131130: The empty database warning does not have the right colors in Dark mode
- Issue #156134721: Inspector annotator is accessing databases from wrong thread
Databinding
- Issue #150397979: viewBinding issue with Android Studio 3.6 Stable
Emulator
- Issue #155825352: Diagnostic warnings are shown as error messages
Espresso Recorder
- Issue #144367566: Record Espresso Test Generates Buggy Tests
- Issue #149687900: testrecorder.ui.RecordingDialog should not initialize constants from network
Import/Sync
- Issue #152889824: Support Variant switching without running Gradle (like switching build variants)
- Issue #150397855: local.properties file generated in buildSrc folder
Layout Editor
- Issue #139716861: Studio freezes when clicking a Button view in the design surface
New Code/Templates
- Issue #79671576: Bug: crazy focus changes upon activity creation
Project Structure
- Issue #149773516: Migrating Android Studio 3.5 Project to 3.6 rc03 causes Unsupported modules detected error
Project View
- Issue #150933937: Renaming a dynamic feature module in Android Studio doesn't update the base build.gradle
Resources
- Issue #142004503: "Remove Unused Resources" for view binding missed method reference syntax (e.g. `LayoutBinding::inflate`)
Search
- Issue #152432842: Navigate to symbol fails to find any symbols
What's New Assistant
- Issue #154924753: What's New Assistant title fonts are too small
版权声明
禁止一切形式的转载-禁止商用-禁止衍生 申请授权