分享好友 生活信息首页 生活信息分类 切换频道
Android Studio 3.6 (February 2020)
2024-12-27 04:31

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

We'd also like to thank all of our community contributors who have helped with this release.

This version of Android Studio includes updates to several design tools, including the Layout Editor and Resource Manager.

The following updates to the visual design editors are included in this release:

To learn more, see Build a UI with Layout Editor.

To help you quickly update color resource values in your app when you're using the color picker in your XML or the design tools, the IDE now populates color resource values for you.

The Resource Manager contains the following updates:

  • The Resource Manager now supports most resource types.
  • When searching for a resource, the Resource Manager now displays results from all project modules. Previously, searches returned results only from the selected module.
  • The filter button lets you view resources from local dependent modules, external libraries, and the Android framework. You can also use the filter to show theme attributes.
  • You can now rename resources during the import process by clicking within the textbox above the resource.

To learn more, see Manage your app's UI resources with Resource Manager.

The latest version of the Android Gradle plugin includes many updates, including optimizations for build speed, support for the Maven publishing plugin, and support for View Binding. To learn more, read the full release notes.

View binding allows you to more easily write code that interacts with views by generating a binding class for each XML layout file. These classes contain direct references to all views that have an ID in the corresponding layout.

Because it replaces , view binding eliminates the risk of null pointer exceptions resulting from an invalid view ID.

To enable view binding, you need to use Android Gradle plugin 3.6.0 or higher and include the following in each module's file:

You can now add a class and then deploy that code change to your running app by clicking either Apply Code Changes  or Apply Changes and Restart Activity .

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

You can now instant-enable your base module at any time after creating your app project as follows:

  1. Open the Project panel by selecting View > Tool Windows > Project from the menu bar.
  2. Right-click on your base module, typically named 'app', and select Refactor > Enable Instant Apps Support.
  3. In the dialog that appears, select your base module from the dropdown menu.
  4. Click OK.

To learn more, read Overview of Google Play Instant.

When using the APK Analyzer to inspect DEX files, you can deobfuscate class and method bytecode as follows:

  1. Select Build > Analyze APK from the menu bar.
  2. In the dialog that appears, navigate to the APK you want to inspect and select it.
  3. Click Open.
  4. In the APK Analyzer, select the DEX file you want to inspect.
  5. In the DEX file viewer, load the ProGuard mappings file for the APK you’re analyzing.
  6. Right-click on the class or method you want to inspect and select Show bytecode.

The following updates support native (C/C++) development in Android Studio.

The following NDK features in Android Studio, previously supported in Java, are now also supported in Kotlin:

  • Navigate from a JNI declaration to the corresponding implementation function in C/C++. View this mapping by hovering over the C or C++ item marker near the line number in the managed source code file.

  • Automatically create a stub implementation function for a JNI declaration. Define the JNI declaration first and then type “jni” or the method name in the C/C++ file to activate.

  • Unused native implementation functions are highlighted as a warning in the source code. JNI declarations with missing implementations are also highlighted as an error.

  • When you rename (refactor) a native implementation function, all corresponding JNI declarations are updated. Rename a JNI declaration to update the native implementation function.

  • Signature checking for implicitly-bound JNI implementations.

The code editor in Android Studio now supports a more seamless JNI development workflow, including improved type hints, auto-completion, inspections, and code refactoring.

You no longer need to create a new project when the APK in your project is updated outside the IDE. Android Studio detects changes in the APK and gives you the option to re-import it.

It is now possible to attach Kotlin-only external APK sources when you profile and debug pre-built APKs. To learn more, see Attach Kotlin/Java sources.

When analyzing a heap dump in the Memory Profiler, you can now filter profiling data that Android Studio thinks might indicate memory leaks for and instances in your app.

The types of data that the filter shows include the following:

  • instances that have been destroyed but are still being referenced.
  • instances that do not have a valid but are still being referenced.

It is now possible to attach Kotlin-only external APK sources when you profile and debug pre-built APKs. To learn more, see Attach Kotlin/Java sources.

When analyzing a heap dump in the Memory Profiler, you can now filter profiling data that Android Studio thinks might indicate memory leaks for and instances in your app.

The types of data that the filter shows include the following:

  • instances that have been destroyed but are still being referenced.
  • instances that do not have a valid but are still being referenced.

In certain situations, such as the following, the filter might yield false positives:

  • A is created but has not yet been used.
  • A is being cached but not as part of a .

To use this feature, first capture a heap dump or import a heap dump file into Android Studio. To display the fragments and activities that may be leaking memory, select the Activity/Fragment Leaks checkbox in the heap dump pane of the Memory Profiler.

Android Studio 3.6 (February 2020)

Android Studio 3.6 helps you take advantage of several updates included in Android Emulator 29.2.7 and higher, as described below.

Android Emulator 29.2.7 and higher provides additional support for emulating GPS coordinates and route information. When you open the Emulators Extended controls, options in the Location tab are now organized under two tabs: Single points and Routes.

Single points

In the Single points tab, you can use the Google Maps webview to search for points of interest, just as you would when using Google Maps on a phone or browser. When you search for or click on a location in the map, you can save the location by selecting Save point near the bottom of the map. All of your saved locations are listed on the right side of the Extended controls window.

To set the Emulators location to the location you have selected on the map, click the Set location button near the bottom right of the Extended controls window.

Routes

Similar to the Single points tab, the Routes tab provides a Google Maps webview that you can use to create a route between two or more locations. To create and save a route, do the following:

  1. In the map view, use the text field to search for the first destination in your route.
  2. Select the location from the search results.
  3. Select the Navigate button.
  4. Select the starting point of your route from the map.
  5. (Optional) Click Add destination to add additional stops to your route.
  6. Save your route by clicking Save route in the map view.
  7. Specify a name for the route and click Save.

To simulate the Emulator following the route you saved, select the route from the list of Saved routes and click Play route near the bottom right of the Extended controls window. To stop the simulation, click Stop route.

To continuously simulate the Emulator following the specified route, enable the switch next to Repeat playback. To change how quickly the Emulator follows the specified route, select an option from the Playback speed dropdown.

The Android Emulator now allows you to deploy your app to multiple displays, which support customizable dimensions and can help you test apps that support multi-window and multi-display. While a virtual device is running, you can add up to two additional displays as follows:

  1. Open the Extended controls and navigate to the Displays tab.

  2. Add another display by clicking Add secondary display.

  3. From the dropdown menu under Secondary displays, do one of the following:

  4. Select one of the preset aspect ratios

  5. Select custom and set the height, width, and dpi for your custom display.

  6. (Optional) Click Add secondary display to add a third display.

  7. Click Apply changes to add the specified display(s) to the running virtual device.

When you create a new project using Android Studio, you can now select from three templates from the Automotive tab in the Create New Project wizard: No Activity, Media service, and Messaging service. For existing projects, you can add support for Android Automotive devices by selecting File > New > New Module from the menu bar, and selecting Automotive Module. The Create New Module wizard then guides you through creating a new module using one of the Android Automotive project templates.

Additionally, you can now create an Android Virtual Device (AVD) for Android Automotive OS devices by selecting one of the following options in the Automotive tab in the Virtual Device Configuration wizard.

  1. Polestar 2: Create an AVD that emulates the Polestar 2 head unit.
  2. Automotive (1024p landscape): Create an AVD for generic 1024 x 768 px Android Automotive head units.

When downloading SDK components and tools using the SDK Manager, Android Studio now allows you to resume downloads that were interrupted (for example, due to a network issue) instead of restarting the download from the beginning. This enhancement is especially helpful for large downloads, such as the Android Emulator or system images, when internet connectivity is unreliable.

In addition, if you have an SDK download task running in the background, you can now pause or resume the download using the controls in the status bar.

The Windows 32-bit version of Android Studio will no longer receive updates after December 2019, and it will no longer receive support after December 2020. You can continue to use Android Studio. However, to receive additional updates, upgrade your workstation to a 64-bit version of Windows.

To learn more, read the Windows 32-bit depreciation blog

In previous releases, Android Studio retrieved the list of all Gradle tasks during Gradle Sync. For large projects, retrieving the task list could cause slow sync times.

To improve Gradle Sync performance, go to File > Settings > Experimental and select Do not build Gradle task list during Gradle sync.

When you enable this option, Android Studio skips building the task list during sync, which allows Gradle Sync to complete faster and improves UI responsiveness. Keep in mind, when the IDE skips building the task list, the task lists in the Gradle panel are empty, and task name auto-completion in build files does not work.

The core Android Studio IDE has been updated with improvements from IntelliJ IDEA through the 2019.2 release.

To learn more about the improvements from other IntelliJ versions that are included cumulatively with version 2019.2, see the following pages:

  • IntelliJ IDEA 2019.1.3
  • IntelliJ IDEA 2019.1.2
  • IntelliJ IDEA 2019.1.1

Thank you to all of our community contributors who have helped us discover bugs and other ways to improve Android Studio 3.6. In particular, we'd like to thank the following people who reported bugs:

    以上就是本篇文章【Android Studio 3.6 (February 2020)】的全部内容了,欢迎阅览 ! 文章地址:http://w.yusign.com/tjnews/2649.html 
     资讯      企业新闻      行情      企业黄页      同类资讯      首页      网站地图      返回首页 述古往 http://w.yusign.com/mobile/ , 查看更多   
最新新闻
学科教学历史考研院校有哪些
对于计划参加学科教学历史考研的研究生来说,选择合适的院校是至关重要的。以下是一些知名的院校,它们在学科教学历史领域中享有
百度停PC浏览器服务 国研政情·经济信息智库:挽不回市场
百度停PC浏览器服务 国研政情·经济信息智库:挽不回市场(赵晨 驱动中国)新闻中国采编网 中国新闻采编网 谋定研究·中国智库网
更多安狗狗清理大师安卓历史版本(6个)
安狗狗清理大师,完全免费的手机空间清理、手机加速的软件。 1:应用信息清理大师,一款专注安卓用户的专业手机清理软件。体积小
六款超级神器!Markdown编辑器、Windows系统安装和禁止自动更新、图片批量修改公交、安全移除USB设备和微信输入法。
大家好,我是北山!本期分享几款免费优质的工具神器,Markdown编辑器、Windows系统安装工具、图片批量修改神器、禁止Windows自动
孝感爱采购标题撰写
百度爱采购也有付费会员和免费会员两类,一般来说付费的优先展示。但这不是全部因素,百度爱采购还会从大数据、用户浏览数据、页
日照网站建设排名优化,打造高效、用户友好的网站,提升搜索引擎排名,日照网站建设哪家好
日照网站建设优化,旨在打造高效、用户友好的网站,提升搜索引擎排名。选择一家好的网站建设公司至关重要,如日照市领先的网络科
漫蛙App官网入口及使用指南:全方位探索动漫世界的必备工具
随着数字化时代的到来,动漫已经成为了全球文化中的重要一部分,而随着动漫爱好者需求的增加,各种相关的应用程序也应运而生。漫
湖北亿纬动力取得一种测试用夹持装置专利,能保证垂直测量的角度,提高垂直测量的可靠性
金融界2024年12月11日消息,国家知识产权局信息显示,湖北亿纬动力有限公司取得一项名为“一种测试用夹持装置”的专利,授权公告
明天有小雪,气温下降,雪后风大!
市气象台12月11日14时发布:今天下午晴间多云,北转南风二三级,最高气温6℃;夜间晴转多云,南转北风一二级,最低气温零下3℃。
天正三亚湾壹号-售楼中心丨楼盘解析丨户型、价格丨最新优惠
跨山越海丨在三亚湾奔赴心之所向☎售楼处热线:0898-66599661【售楼中心】☎专属金牌置业顾问:13379996468【微信同步】★★售楼