Using the hierarchy Viewer under Android Studio

Source: Internet
Author: User
Tags deprecated

Objective

Recently read this article, "Android UI performance Optimization", which uses the hierarchy viewer to optimize the layout. The development of Android so long, has been heard this tool, but never really go to use, have to say is a failure. Now just take advantage of the idle, study the use of Hierarchy Viewer.

Start Android Device Monitor

Online search for the tutorial, directly sdk>tools below to find the hierarchyviewer.bat double-click Run, and then run successfully.
But this tip appears:

The standalone version of Hieararchyviewer is deprecated.
Use Android Device Monitor (tools/monitor.bat) instead.

The idea is that a separate version of Hieararchyviewer has been deprecated. Please use Android Device Monitor instead. Android Device Monitor can be found under the tools directory monitor.bat .

To keep up with the trend of the times, I decided to use Android Device Monitor !

But it tools 's too much trouble to start Android Device Monitorfrom under the directory every time. Can't you start directly under the almighty Android studio?

The answer is: Of course you can! There are two ways to start. (There are no more than two versions of Android Studio 2.2)

    1. First Kind
      Click the menu Tools>Android>Android Device Monitor , such as:

      Start Android Device Monitor

2. The second type of
Click the icon next to the question mark directly below the menu, such as:


Start Android Device Monitor to open hierarchy Viewe

After launching Android Device Monitor successfully, click the Toggle View icon in the new window and select Hierarchy viewe, such as:


Open hierarchy Viewe using hierarchy Viewer

Because it has been developed with the real machine, after the start, found not to see the due effect, the following error occurred:

[2016-04-15 15:44:26-hierarchyviewer] Unable to get view server version from Device 2d2843d
[2016-04-15 15:44:26-hierarchyviewer] Unable to get View server protocol version from device 2d2843d

Discovered because the real machine could not get to view server the cause.
Detailed reasons for this issue: Why Hierachyviewer cannot connect to a real-machine debug

Currently, there is no opening on view server the hand, so you can only use the simulator.
Before the Genymotion simulator was deleted, I can only use the simulator ╮ (╯_╰) ╭ but the project on hand only supports the ARM architecture of the simulator run, not Intel HAXM to use to accelerate, so the purpose of so much nonsense is to explain: the simulator is really too slow!
And then into the long wait ...
......
......
......
An hour has passed! And then it's time to get off! -_-||
Sorry, I can't see the result!
Sorry to see the results, the opening steps have been said, the specific use of the situation here is no longer explained. Online a lot, posted here one (the beginning has been mentioned):
Android UI Performance Tuning detailed] (HTTP://MRPEAK.CN/ANDROID/2016/01/11/ANDROID-PERFORMANCE-UI)

Gotta get off the clock! Just write here, the full text is over!

In order to prevent the day dogs, causing undesirable social effects, special supplement running results:


Run results

Friendly tip: The app runs first and then uses Android Device Monitor .

Using the hierarchy Viewer under Android Studio

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.