Android Studio 4.1 Canary 10 available

Android Studio 4.1 Canary 10 available

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/valuesres/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

Emulator

Espresso Recorder

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

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

What's New Assistant

版权声明

禁止一切形式的转载-禁止商用-禁止衍生 申请授权

脉脉不得语
脉脉不得语
Zhengzhou Website
Android Developer | https://androiddevtools.cn and https://androidweekly.io WebMaster | GDG Zhengzhou Funder & Ex Organizer | http://Toast.show(∞) Podcast Host

你已经成功订阅到 Android 开发技术周报
太棒了!接下来,完成检验以获得全部访问权限 Android 开发技术周报
欢迎回来!你已经成功登录了。
Unable to sign you in. Please try again.
成功!您的帐户已完全激活,您现在可以访问所有内容。
Error! Stripe checkout failed.
Success! Your billing info is updated.
Error! Billing info update failed.