分享好友 生活信息首页 生活信息分类 切换频道
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://o27ke.yusign.com/tjnews/2649.html 
     资讯      企业新闻      行情      企业黄页      同类资讯      首页      网站地图      返回首页 述古往 http://o27ke.yusign.com/mobile/ , 查看更多   
最新新闻
大连商品交易所计划推出豆粕和玉米系列期权
  中新网大连12月20日电 (记者 杨毅)大连商品交易所(以下简称“大商所”)20日发布公告,对期权交易管理办法以及豆粕期权合约、
干儿子?FIFA硬蹭梅西热度!C罗不争气 绝代双骄无接班人
国际足联公布了2024年FIFA年度最佳候选名单,的入选出人意料。很多人质疑,梅西是FIFA的“干儿子”,事实上,是FIFA在硬蹭梅西热
张家界市永定区福利彩票销售过亿元
正在召开福彩销售工作会议正在颁奖红网时刻新闻1月16日讯(通讯员 田贵学 黄莲锦)1月16日,笔者从张家界市永定区召开的2024年度
首播将至!《长安的荔枝》来袭!阵容深厚,终于有部能看的大剧了
2024年3月11号开机,7月2号杀青。到了10月18日,又首发预告。那么猜一下,这部剧几时开播?不卖关子了。马亲王的大作《长安的荔
那些被传很 “脏” 的食物,真的不能吃吗?
吃猪肝=吃毒素、重金属?吃鸭血=吃“垃圾”?吃鱼头、鱼皮=吃“毒药”?这些说法是真的吗?动物内脏食材到底怎样吃更靠谱呢?来
成都引领奔跑的年轻人|王成城:做“平价有机”的引领者
编前语:近年来,成都优越的营商环境、创新创业的活力、公园城市的美景不断吸引越来越多“蓉漂”人才加盟。同时也吸引了一大批外
《好团圆》比谍战剧更烧脑的“小三”上位记,李书是哪一类人的缩影
即便我已经在极度缺觉加嗜睡的状态下停更了一天,即便我在刚刚睡过午觉之后依旧无法用超浓咖啡唤醒自己。可当我昏昏沉沉看到李书
苏醒妻子晒新装修的房子,全屋定制翻车柜子歪歪扭扭,称差点气晕
苏醒妻子廖语辰在个人社交平台分享出新装修的房子,她失望称全屋定制翻车,但给了全款,测量完全不对,现场切割装上,歪歪扭扭,
体彩大乐透好事成双 太原市购彩者中得765万元巨奖
本报讯(记者 杨尔欣)1月9日,来自太原市和运城市的两位幸运购彩者现身山西省体育彩票管理中心,分别领取了一份体彩大乐透765万
进军欧洲足球!杜兰特正式成为巴黎俱乐部小老板 透露开始考虑退役
北京时间8月13日,杜兰特通过他的Boardroom体育公司宣布,他将投资巴黎圣日耳曼俱乐部,成为该俱乐部的小老板之一,更多详情会在