分享好友 最新动态首页 最新动态分类 切换频道
Android Studio 4.1 (August 2020)
2024-12-26 23:35

Android Studio 4.1 is a major release that includes a variety of new features and improvements.

Inspect, query, and modify your databases in your running app using the new Database Inspector. To get started, deploy your app to a device running API Level 26 or higher, and select View > Tool Windows > Database Inspector from the menu bar.

To learn more, see Debug your database with the Database Inspector.

You can now run the Android Emulator directly in Android Studio. Use this feature to conserve screen real estate, to navigate quickly between the emulator and the editor window using hotkeys, and to organize your IDE and emulator workflow in a single application window.

To learn more, see the Android Emulator documentation.

ML Model Binding makes it easy for you to directly import model files and use them in your projects. Android Studio generates easy-to-use classes so you can run your model with less code and better type safety.

The current implementation of ML Model Binding supports image classification and style transfer models, provided they are enhanced with metadata. Over time, support will be expanded to other problem domains, like object detection, image segmentation, and text classification.

A wide range of pre-trained models with metadata are provided on TensorFlow Hub. You can also add metadata to a TensorFlow Lite model yourself, as is outlined in Adding metadata to TensorFlow Lite model.

To import a supported model file, follow these steps:

  1. Open the TensorFlow Lite model import dialog in the File menu at File > New > Other > TensorFlow Lite Model.
  2. Select the model file that you previously downloaded or created.
  3. Click Finish.

This imports the model file into your project and places it in the folder; if the directory doesn't exist, Android Studio creates it for you.

To see the details for an imported model and get instructions on how to use it in your app, double-click the model file in your project to open the model viewer page, which shows the following:

  • Model: High-level description of the model
  • Tensors: Description of input and output tensors
  • Sample code: Example of how to interface with the model in your app

Here is an example using mobilenet_v1_0.25_160_quantized.tflite:

As the example demonstrates, Android Studio creates a class called for interacting with the model.

If the model does not have metadata, this screen will only provide minimal information.

  • Support for TensorFlow Lite models for problem domains other than image classification and style transfer is currently limited. Although import should work fine, some model inputs and/or outputs are represented by TensorBuffers rather than friendly types. For models without any metadata, all model inputs and outputs will be TensorBuffers.
  • Models with Input and Output data types different from or are not supported.

This feature is still under development, so please provide feedback or report bugs.

The Android Studio Memory Profiler now includes a Native Memory Profiler for apps deployed to physical devices running Android 10 or later. With the Native Memory Profiler, you can record memory allocations and deallocations from native code and inspect cumulative statistics about native objects.

To learn more about the Native Memory Profiler, see Inspect your app's memory usage with Memory Profiler.

The Native Memory Profiler in Android Studio 4.1 does not work for Android 11 devices. Support for profiling Android 11 devices is currently available in the 4.2 preview release".

As of the initial 4.1 release, app startup profiling has been disabled. This option will be enabled in an upcoming release.

As a workaround, you can use the Perfetto standalone command-line profiler to capture startup profiles.

The System Trace UI in the Android Studio profiler includes the following improvements:

  • Summary tab: The new Summary tab in the Analysis panel displays:

    • Aggregate statistics for all occurrences of a specific event, such as an occurrence count and min/max duration.

    • Trace event statistics for the selected occurrence.

    • Data about thread state distribution.

    • Longest-running occurrences of the selected trace event.

    To navigate to another occurrence, select another row from the table.

  • Display data: In the Display section, new timelines for SurfaceFlinger and VSYNC help you investigate rendering issues in your app's UI.

For basic usage instructions on how to record a system trace, see the Record traces section of Inspect CPU activity with CPU Profiler.

With the new standalone profilers, it's now possible to profile your app without running the full Android Studio IDE.

For instructions on using the standalone profilers, see Run standalone profilers.

Android Studio makes it easier to navigate between your Dagger-related code by providing new gutter actions and extending support in the Find Usages window.

  • Find Usages node: When you invoke Find Usages on a provider of a given type, the Find window now includes a Dependency consumer(s node that lists consumers of that type. Conversely, invoking this action on a consumer of a Dagger-injected dependency, the Find window shows you the provider of that dependency.

Android Studio templates in the Create New Project dialog now use and conform to updated guidance for themes and styles by default. Updates include:

  • MDC: Projects depend on in . Base app themes use parents and override updated MDC color and “on” attributes.

  • Color resources: Color resources in use literal names (for example, instead of ).

  • Theme resources: Theme resources are in (instead of ) and use names.

  • Dark theme: Base application themes use parents and are split between and .

  • Theme attributes: Color resources are referenced as theme attributes (for example, ) in layouts and styles to avoid hard-coded colors.

The core Android Studio IDE has been updated with improvements from IntelliJ IDEA through the 2020.1 release, including a new Commit window that enables version control operations and a new Zen mode that can be toggled by selecting View > Appearance > Enter Distraction Free Mode.

To learn more about the improvements in version 2020.1, see .

The locations of user configuration directories have been changed to the following:

Syntax:

Example:

Syntax:

Example:

Syntax:

Example:

These new directory locations are consistent with recent updates to IntelliJ IDEA, the IDE on which Android Studio is based.

If Studio doesn't restart after an upgrade, you may need to delete the configuration directory from a previous Studio version. See the known issues page for more information.

Android Studio 4.1 bundles Kotlin 1.3.72, which includes a number of fixes to improve Kotlin highlighting, inspections, and code completion. Check out the 1.3.72 Kotlin changelog for details.

When creating a custom view (for example, by extending the or class), Android Studio now shows you a preview of your custom view. Use the dropdown menu in the toolbar to switch between multiple custom views, or click the buttons to wrap vertically or horizontally to the content.

When a crash or ANR occurs in native code, the system produces a stack trace, which is a snapshot of the sequence of nested functions called in your program up to the moment it crashed. These snapshots can help you to identify and fix any problems in the source, but they must first be symbolicated to translate the machine addresses back into human-readable function names.

If your app or game is developed using native code, like C++, you can now upload debug symbols files to the Play Console for each version of your app. The Play Console uses these debug symbols files to symbolicate your app's stack traces, making it easier to analyze crashes and ANRs. To learn how to upload debug symbols files, see Native crash support.

To help you be more productive as you iterate on your app, we've made the following enhancements to Apply Changes for devices running Android 11 Developer Preview 3 or higher:

To learn more about the difference between these two actions, see Apply Changes.

最新文章
【C8600360清理大师下载】华为C8600360清理大师8.4.2免费下载
清理大师:更简单,更畅快!6亿用户信赖的手机清理!清理大师是一款完全免费的手机加速与空间清理软件,强力加速使手机运行更流畅,一键清理快速解决空间不足问题。【一键清理】一键搞定无用垃圾,手机清理更省心【手机加速】瞬间释放手机
《时代》专访ChatGPT之父:人工智能影响经济还需要很多年
划重点:① OpenAI的首席执行官山姆·奥特曼(Sam Altman)曾表示,如果使用不当,人工智能会让所有人都消亡。② 在倡导人工智能可能性的同时,奥特曼敦促政策制定者制定规则和通过监管来减轻人工智能可能带来的危险。奥特曼倡导用普世的基
抖音直播突围:封闭外链中的外链建设策略169
## 网站外链规划师:抖音直播封闭外链外链建设方案 #### ## 一、背景分析抖音平台对外部链接的限制日益严格,使得传统的外链建设方式难以奏效。为了突破这一限制,需要制定针对性的外链建设策略。## 二、目标设定* 增加高质量的反向链接*
vue自建h5应用,接入企业微信JDK(WECOM-JSSDK),实现跳转添加好友功能
1、使用vue开发了一套h5页面的项目 2、这个h5链接是在企业微信里某个地方打开的 3、打开页面的时候有一个好友列表,点击好友列表某一条复制手机号跳转到企业微信添加好友页面 博客只允许上传gif图,所以我只能手机进行录屏
网站文章快速地被百度搜索引擎收录的操作方法解析
今天Lkr.com SEO技术教程学习网就来给大家分享一下它的实际测试操作:如何让百度搜索引擎快速收录网站文章。第一步:为网站文章建立关键词标题简单来说,很多站长都会使用关键词来嵌入网站文章标题,但是很多站长却忽略了用户的搜索习惯。
《名侦探柯南》第1121话图透:新一和小兰甜蜜发糖!白马探看穿基德伪装?
最近一个月,《名侦探柯南》漫画正在连载新的系列篇章,柯南、基德(新一)、白马探、小兰等人气角色集体登场。剧情有“新兰”CP发糖的甜蜜、有“三巨头”联手破案的烧脑、还有白马探辨别基德身份的惊险,每一话都无比精彩。而《名侦探柯南
陈达美股投资
几天前去了百度世界2024,人山人海纳百川。我讲百度的段子已经讲到了,只要提到百度,大家就会想到我。所以会后就有媒体记者采访,阿达啊,说说百度世界2024呗。我说啊,“三个事印象比较深刻,第一,没想到大模型那么难货币化变现,道阻且
百度和吉利高管称将兜底极越智驾和售后;Kimi突然崩了丨邦早报
【百度和吉利高管称将兜底极越智驾和售后】12月14日,百度集团副总裁、智能驾驶事业群组总裁王云鹏在朋友圈公开表示:“我们已经开始行动,智驾和地图导航有我们兜底,请极越车主放心。”同日,吉利控股集团高级副总裁杨学良也发布微博称,
百度明星排行榜在哪(百度明星排行榜在哪看)
大家好!今天让创意岭的小编来大家介绍下关于百度明星排行榜在哪的问题,以下是小编对此问题的归纳整理,让我们一起来看看吧。开始之前先推荐一个非常厉害的Ai人工智能工具,一键生成原创文章、方案、文案、工作计划、工作报告、论文、代码
云决科技如何利用AI技术革新办公场景,助力行业转型
近年来,人工智能(AI)的迅速发展引发了科技界和各行业的广泛关注。从2016年阿尔法狗战胜围棋冠军李世石以来,公众对于AI的信任度大幅攀升。2020年,OpenAI推出的ChatGPT-3,更是使得AI的应用普及化,推动了智能化时代的到来。在这一背景
相关文章
推荐文章
发表评论
0评