The stable version of Android Studio 3.6 is finally here, and this version of Android Studio includes updates to several design tools, including the layout editor and explorer.

This update requires Plugin support. For example, Dart and Flutter plug-ins need to be updated simultaneously.

– Multiple previews have been removed from the 3.6.1 update and are now available in version 4.0. Git version control authentication issues have also been fixed

First, design tools

This version of Android Studio includes updates to several design tools, including layout editors and resource managers.

1. Split the view and enlarge the design editor

This release contains the following updates to the visual design editor:

  • Design editors (for example, layout editors and navigation editors) now provide support for a split view that allows you to view both the design view and the code view of the UI. In the upper right corner of the editor window, there are now three buttons to toggle between view options:

    • To enable split view, click the Split icon.

    • To enable the XML Source view, click the Source icon

    • To enable design view, click the Design icon

  • The Zoom and panning controls in the design editor have been moved to the floating panel in the lower right corner of the editor window.

2. Color Picker Resources TAB

In order to quickly update the color resource values in your application when using the color pickers in XML or design tools, the IDE now populates the color resource values.

3. Resource management

Resource Manager contains the following updates:

  • Resource Manager now supports most resource types.
  • When searching for resources, Explorer now displays the results for all project modules (previously, the search only returned results from the selected module).
  • The filter button allows you to view resources from local dependency modules, external libraries, and Android-frameworks as well as display theme properties using filters.
  • You can rename a resource during the import process by clicking in the text box above the resource.

Update Android Gradle plugin

The latest version of the Android Gradle plugin includes a number of updates, including build speed optimization, support for Maven publishing plug-ins, and support for view binding.

1. View the binding

Views can be bound to make it easier to write code that interacts with views by generating binding classes for each XML layout file. These classes contain direct references to all views that have ids in the corresponding layout.

Because it replaces findViewById(), view binding eliminates the risk of null pointer exceptions due to invalid view ids.

To enable view binding, you need to use Android Gradle plugin 3.6.0 or later and include the following in the build. Gradle file for each module:

android {
    viewBinding.enabled = true
}
Copy the code

Apply changes

You can now add a class during development and click “Apply Code Changes”

Or Apply Changes and Restart Activity to deploy the code Changes to the running application

Refactor menu options to enable Instant Apps support

Enable the base module immediately after creating the application project, as shown below:

    1. Open the Project panel by selecting View > Tool Windows > Project from the menu bar.
    1. Right-click on the basic module commonly referred to as “Applications” and choose Refactor > Enable Instant Apps Support.> Enable Instant Application Support.
  • 3. In the dialog box that appears, select the basic module from the drop-down menu.
  • 4. Click OK.

Note: The option to instantly enable the base application module from the Create New Project wizard has been removed.

5. De-obfuscate class and method bytecode in APK parser

When examining DEX files with APK Analyzer, you can blur class and method bytecodes by following these steps:

  • 1. Choose Build > Analyze APK from the menu bar.
  • 2. In the dialog box that appears, navigate to the APK you want to check, and then select it.
  • 3. Click Open.
  • 4. In the APK analyzer, select the DEX file to be checked.
  • 5. In the DEX file viewer, load the ProGuard mapping file for the APK to be analyzed.
  • 6. Right-click the class or method you want to check and choose Show Bytecode.

Six, Native Tooling

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

1. The Kotlin support

Kotlin now supports NDK features that were previously supported by Java in Android Studio:

  • Navigate from the JNI declaration to the corresponding implementation function in C/C ++. This mapping can be viewed by hovering over the C or C ++ project tag near the line number in the managed source file.
  • Declare automatic stub creation implementation for JNI. First define the JNI declaration, then activate it by typing “JNI” or method name in the C/C ++ file.

  • Unused Native Implementation functions are highlighted as warnings in the source code. JNI declarations that lack implementation will also be highlighted as errors.
  • When you rename (refactor) native Implementation functions, all corresponding JNI declarations are updated. Rename JNI declarations to update Native Implementation Functions.
  • Signature checks are performed on JNI implementations of implicit binding.

Other JNI improvements

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

3. Reload the APK of the local hangar

There is no need to create a new project when updating APK in a project outside the IDE. Android Studio detects changes in APK and provides an option to re-import the APK.

7, Attach Kotlin-only APK Sources

Analysis and debugging now pre-built APK, can be attached only Kotlin external APK source: developer.android.com/studio/debu… .

Leak detection in memory profiler

Now, when analyzing heap dumps in the Memory Profiler, you can filter performance analysis data that Android Studio thinks might indicate Memory leaks in your application Activity and Fragment instances.

The data types displayed by filters include:

  • ActivityThe instance has been destroyed but is still referenced.
  • FragmentInstance is null and voidFragmentManagerBut it’s still being cited.

In some cases, such as the following, the filter may produce false positives:

  • A FragmentCreated but not in use.
  • aFragmentIs cached, but not as part ofFragmentTransaction.

To use this feature, either capture a heap dump or import a heap dump file into Android Studio. To display fragments and activities that may be leaking memory, select the Active/Fragment Leaks check box in the Heap dump pane of Memory Profiler. (Filter heap dumps to prevent memory leaks.)

Ix. Simulator

Android Studio 3.6 can take advantage of several updates included in Android Emulator 29.2.7 and later, as described below.

1. Improved location support

Android Emulator 29.2.7 and later provide additional support for emulating GPS coordinates and route information. When opening the Emulators Extended Controls, control, the 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 like you would on your phone or browser. When searching for or clicking a location in a map, you can save the location by selecting a save point near the bottom of the map. All save locations are listed on the right side of the extension control window.

To set the Simulator location to the location selected on the map, click the Set Location button near the lower right corner of the Extended Controls window.

Routes

Similar to the Single Points TAB, the Routes TAB provides a Google Maps Web view that can be used to create Routes between two or more locations. To create and save a route, do the following:

  • 1. In the map view, search for the first destination in the route using the text field.
  • 2. Select a location from the search results.
  • 3. Select the Navigate button

  • 4. Choose the starting point of the route from the map.
  • 5. (Optional) Click Add Destination to add more stops to the route.
  • 7. Specify a name for the route and click Save.

To emulate the emulator with the Saved route, select the route from the list of Saved Routes, and then click Play Route near the lower right corner of the Extended Controls window. To stop the simulation, click stop Route.

To continuously emulate the emulator along the specified path, enable the switch next to repeat playback. To change the speed at which the emulator follows the specified route, select an option from the Playback Speed drop-down list.

2. Multi-monitor support

– Multiple previews have been removed from the 3.6.1 update and are now available in version 4.0.

The Android emulator now allows applications to be deployed to multiple displays that support customizable sizes and can help test applications that support multiple Windows and multiple displays. When the virtual appliance is running, you can add up to two of the following displays:

  • 1. Open the extension control, then navigate to the Displays TAB.
  • 2. Click Add Add Secondary Display to Add another display.
  • In 3.Secondary displaysOn the menu, perform the following operations:
    • A. Select a preset aspect ratio
    • B. Select Custom and set the height, width, and DPI for custom display.
  • 4. (Optional) Click Add Secondary Display to Add a third display.
    1. Click Apply Changes to add the specified display to the running virtual appliance.

3. New virtual appliance and project templates for Android Automotive OS

When creating a New Project using Android Studio, you can now choose from three templates in the Automotive TAB of the Create New Project wizard: No Activity, Media Service, and Messaging Service.

For existing projects, you can add support for devices by selecting File > New > New Module from the menu bar and then Android Automotive. The Create New Module wizard will then guide you through creating a New Module using one of the Android Automotive project templates.

In addition, you can now select one of the following options from the Automotive TAB of the Virtual Device Configuration Wizard, Create an Android Virtual Device (AVD) for Android Automotive OS devices.

  • Polestar 2: Create an AVD that emulates the Polestar 2 host.
  • 2.Automotive (1024p landscape) : Create an AVD for a typical 1024 x 768 px Android vehicle host.

X. Recoverable SDK download

When downloading SDK components and tools using SDK Manager, Android Studio now allows you to resume downloads that have been interrupted (for example due to network problems) without having to restart the download from scratch. This enhancement is especially useful for large downloads, such as Android emulators or system images, when the Internet connection is unreliable.

In addition, if you run the SDK download task in the background, you can now pause or continue the download using the control in the status bar.

Status bar background download task, with a new control, you can pause or continue the download.

Win32 has been deprecated

The Windows 32-bit version of Android Studio will no longer be updated after December 2019, and will no longer be supported after December 2020. Developers can continue to use Android Studio. However, to receive other updates, upgrade your workstation to a 64-bit version of Windows.

Optimizes Gradle synchronization with new options

In previous versions, Android Studio retrieved the list of all Gradle tasks during Gradle Sync. For large projects, retrieving the task list can lead to slow synchronization times.

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

With this option enabled, Android Studio skips the build task list during synchronization, allowing Gradle Sync to complete faster and improve UI responsiveness. Remember that when the IDE skives the build task list, the task list in the Gradle panel is empty and the task name auto-complete in the build file does not work.

Switch Gradle offline mode to a new location

To enable or disable Gradle’s offline mode, first choose View > Tool Windows > Gradle from the menu bar. Then, near the top of the Gradle window, click Toggle Offline Mode:

Known problems with 3.6

This section covers the current known issues in Android Studio 3.6.

1. Key mapping conflicts on Linux

On Linux, certain keyboard shortcuts conflict with the default Linux keyboard shortcuts and those of popular window managers such as KDE and GNOME. These keyboard shortcuts may not work properly in Android Studio.

2. Text on the Chrome OS

On Chrome OS, text can look much smaller than in previous versions. To workaround this problem, do the following:

  • 1. Click File > Settings to open the Settings window.
  • 2. Navigate to Appearance & Behavior > Appearance.
  • 3. Select Use Custom Font.
  • 4. Increase font size.
  • 5. In the Settings window, navigate to Editor > Font.
  • 6. Increase font size.
  • 7. Click OK.