Android Developers cause: Android Studio 3.6 stable release friends, come onlookers!

Android Studio 3.6 stable version finally came, this version of Android Studio includes updates to some design tools, including the layout editor and resource manager.

This version of the update requires a corresponding update Plugin support, such as Dart and Flutter corresponding plug-in requires synchronization update, the first startup may be more cards, eating performance.

First, the design tool

This version of Android Studio includes updates to some design tools, including a layout editor and resource manager .

1, and an enlarged view of a split design editor

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

  • Design editor (e.g., editor layout and navigation editor) now provides a split view of the support, it can be viewed simultaneously UI design view and code view . At the top right of the editor window, there are three buttons can be used to toggle between viewing options:

  • To enable split view, click the "Split" icon.

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

  • To enable Design view, click the "Design" icon

  • Design editor zoom and pan controls have been moved to the lower right corner of the editor window floating panel.

2. Color Picker Resources tab

To be able to quickly update the resource value of the color application in the use of XML or design tool, color picker, IDE will now fill color resource values.

3. Resource Management

Explorer contains the following updates:

  • Explorer now supports most asset types.
  • When searching for resources, resource manager will now show the results of all project modules (previously, the search returns results only from the selected module).
  • Filter button to view from a local dependent module, external libraries and Android - resources framework can also use filters to display the topic properties.
  • By over resources during the import text box, click to rename the resource.

Second, update the Android Gradle plugin

The latest version of Android Gradle plugin includes a number of updates, including the construction of optimized speed release of Maven plug-in support and support for the view bindings .

1. Bind View

Binding view after by generating binding classes for each XML layout files to make it easier to write code to interact with the view. These classes contain a direct reference to all views in the corresponding ID having layout.

Because it replaces findViewById (), so the view binding eliminates the risks of ineffective view ID cause a null pointer exception.

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

android {    viewBinding.enabled = true}

Third, the application changes

Now in the development process can add a category, then click the "Apply Code Changes"

Or "the Apply Changes and the Restart Activity" , change the code to deploy the application is running

Fourth, the reconstruction of the menu option to enable Instant Apps support

Enable After you create an application project immediately foundation module, as shown below:

  • By selecting from the menu bar View> Tool Windows> Project to open the "Project" panel.
  • Right-click commonly referred to as "application" of the basic module, and select Refactor> the Enable the 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: Instant enabled basic application module from the "Create New Project" wizard option has been removed.

Fifth, the anti-aliasing APK analyzer bytecode classes and methods

Use APK Analyzer check DEX files can bytecode classes and methods obfuscate the following steps:

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

六、Native Tooling

The following update supports Android Studio in native (C / C ++) development.

1. Kotlin support

Previously supported by the Java Android Studio NDK support functions are now also able to support the Kotlin:

  • Navigate to the statement from the JNI C / C ++ to achieve the corresponding function. Hover near the managed source code file line numbers in C or C ++ project marks on, you can view this map.
  • JNI statement to automatically create a stub implementation functions. First define JNI statement, and then type "jni" or method name in C / C ++ file to activate.

  • native implementation functions not used in the source code highlighted warning. JNI also realize the lack of a statement will be highlighted as an error.
  • When renaming (refactoring) native implementation functions, all of the corresponding JNI statement will be updated. Rename JNI statement to update the native implementation functions function.
  • JNI implementation of implicit binding to sign checks.

2. Other improvements JNI

Android Studio code editor now supports a more seamless workflow JNI development, including improved types of prompts, auto-complete, inspection and code refactoring.

3. reload APK native library

No longer need to create a new project outside the IDE when APK update project. Android Studio detects changes in the APK, and offers the option of re-import APK.

七、Attach Kotlin-only APK Sources

Now pre-built analysis and debug APK, it can be attached only Kotlin APK external source: https: //developer.android.com/studio/debug/apk-debugger#attach_java

Eight, memory leak detection Profiler

Now, in the Memory Profiler analysis heap dump, you can filter Android Studio believes may indicate a performance analysis of the data leak Activity and Fragment examples of application memory.

Data display type filter comprising:

  • Activity instance has been destroyed, but still reference.
  • Fragment example FragmentManager but still invalid references.

In some cases, for example the following case, the filter may produce false positives:

  • A Fragment has been created, but not used.
  • Fragment is a cache, but not as part of FragmentTransaction.

To use this feature, please capture a dump heap or the heap dump file import Android Studio. To display may be leaking memory chips and activities, check the "in" Memory Profiler "heap dump pane Events / debris leakage " check box. (Screening heap dump to prevent memory leaks.)

Nine, simulator

Android Studio 3.6 may be utilized Android Emulator 29.2.7 and later includes the plurality of update, as described below.

1. Improved support position

Android Emulator 29.2.7 and later provides additional support for the simulation of GPS coordinates and route information. When you open Emulators Extended controls, controls, Location tab options are now organized under two tabs: "Single Points" and "the Routes" .

  • 1.1. Single points

In Single points tab, you can search for points of interest using Google Maps Webview, the same as using Google Maps on your phone or browser. When searching for location or click on the map, you can save by choosing the location to save a point near the bottom of the map. All saved locations are listed on the right side of the extended control window.

To "Simulator" location settings selected location on the map, click the Extended controls window "Set Position" button near the bottom right corner.

  • 1.2. Routes

Single points with labels similar, Routes tag provides Google Maps Web view, can be used to create a route between two or more locations. To create and save a route, do the following:

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

  • 4. Select the starting point of the route from the map.

  • 5. (Optional) Click the Add destination to add more stops to the route.

  • 6. Specify a name for the route, and then click Save.

To save the route in accordance with the analog simulator, select Route Saved routes from the list, and then click Play route near the lower right corner of the window Extended controls. To stop the simulation, click on the Stop line.

To the specified path of the continuous simulator, enable switch next repeat. To change the simulator to follow a specified route speed, select an option from the drop-down list Playback speed.

2. Multi-monitor support

Android emulator now allows to deploy an application to a plurality of display supports custom size, and can help support the test applications and multiple multi-window display. In a virtual appliance running, you can add up to two the following display:

  • 1. Open the extended control, and then navigate to the Displays tab.

  • 2. Click Add Add secondary display to add another display.

  • 3. Secondary displays menu, do one of the following:

  • a. Select a preset aspect ratio

  • b. Select Custom settings and display height, width and custom dpi.

  • 4. (Optional) Click Add secondary display to add a third show.

  • 5. Click the Apply Changes , the specified display added to the virtual device is running.

3. For Android Automotive OS new project templates and virtual devices

When you create a new project using Android Studio, is now available from Create New Project wizard Automotive selected tab three templates: No Activity , Media Service and Messaging Service .

For existing projects, you can choose from the menu bar File> New> New Module , and then select Android Automotive to add support for the device. Then, the Create New Module Wizard will guide the creation of new modules use either Android Automotive project template.

In addition, now through the Virtual Device Configuration wizard Automotive Select one of the following options tab for Android Automotive OS device the Create AN Android Virtual Device (AVD) .

  • 1. Polestar 2 : AVD create a simulation Polestar 2 host.
  • 2. Automotive (1024p Landscape) : AVD to create a generic 1024 x 768 px Android onboard host.

X. recoverable SDK download

Now, when using the SDK Manager to download the SDK components and tools, Android Studio is now allowed to resume interrupted downloads (for example, due to network problems), without having to start from scratch again to start the download. When the Internet connection is not reliable, this enhancement is particularly useful for large downloads (e.g. Android emulator or system image).

In addition, if you run the SDK download tasks in the background, you can now use the controls in the status bar to pause or resume downloading.

Background downloading task status bar, with new controls to pause or resume downloads.

Eleven, Win32 deprecated

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

XII optimization Gradle synchronization time of the new options

In previous versions, Android Studio to retrieve a list of all tasks during Gradle Gradle Sync. For large projects, to retrieve a list of tasks could lead to slower time synchronization.

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

With this option enabled, Android Studio will skip the build task list in the synchronization process, so that Gradle Sync completed faster and improved UI responsiveness. Remember, when the IDE build skipped task list, task list Gradle panel is empty, and the task in the build file name does not work automatically.

Thirteen, the new position switching Gradle offline mode

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

XIV 3.6 Known Issues

This section describes the currently known issues in Android Studio 3.6.

Key mapping conflicts 1. Linux

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

Small text on the screen 2. Chrome OS

On Chrome OS, the text may seem to be much smaller than previous versions. To work around this problem, do the following:

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

At last

In this I also share a big brother himself included finishing the Android architecture study PDF + Video + Interview + document source notes , as well as advanced technical architecture Advanced Brain Mapping, Android interview with thematic development, senior advanced information architecture these are my leisure boutique will be repeated read data. In the mind map, each point is equipped with a knowledge of the topic corresponding to the actual project, can effectively help you grasp the knowledge points.

In short we are also here to help enhance learning advanced, but also saves you the time to learn online search data can also be shared with close friends studying together

If you have a need, you can point like + comment , concern me , click here or add Vx: 15388039515 (Note CSDN, need information)

Published 200 original articles · won praise 83 · views 70000 +

Guess you like

Origin blog.csdn.net/weixin_45258969/article/details/104516172