Hierarchy Viewer is gone - hierarchyviewer

It used to work well.But recently I upgraded my Android Studio to 2.3 and I find the hierarchy viewer disappears.I can't find it both in the sdk/tools directory and the Android Device Monitor.

Latest build tools (25.3.0) removes hierarchy viewer.
http://tools.android.com/recent/androidsdktoolsrevision2530feb2017

"The Layout Inspector available in Android Studio 2.2 is an early release. It's a work in progress that will supersede the Hierarchy Viewer tool once it is feature complete. For now, it provides a quick solution to inspect the view properties of your layout without leaving the IDE. " I find it in http://tools.android.com/tech-docs/layout-inspector.
According to it the Hierarchy Viewer is removed and we should use the layout inspector instead?

You can find it in the Android Studio with path
Tools > Android > Android Device Monitor > Window > Open perspective > Hierarchy View
You can refer this very detail post for more.

Related

Kotlin Multipplatform - can't see Greeting.kt in Android Studio folder tree

I am just starting to learn KMM (I'm an Android java guy right now) and going through the default Greeting version of Hello World that is automatically put into a new application. My environment seems to be working as I was able to run the default app on both Android and iOS emulators.
However I can't see the file Greeting.kt in the Project tree. I can certainly search for it and open it from Find, but when I drill down the tree shared/commonMain/kotlin/com.myapp... it only shows Platform.
I have a screen cap that shows the path of the open Greeting.kt at the top, but not visible in the tree:
(screen cap)
Unfortunately I can't post an image (not enough reputation), but when I open the file Greeting.kt by doing a Find In Project, it shows the path at the top of the screen (My Application > shared > src > commonMain > kotlin > com > example > myapplication > Greeting), but when I manually drill down the Project tree on the left side of Android Studio Greeting.kt does not show up.
I can also find the file in the Mac Finder. My guess a preference in Android Studio is incorrect?
Any ideas on what might be wrong?
Thanks in advance
Turns out it was an official bug. Solution is to upgrade to Beta version of Android Studio (Chipmunk)
I submitted a bug report to Google and they looked into it:
The root cause is that before [Android Studio]Chipmunk the source set
setup was incorrect, so even though it says commonMain in your
screenshot (from #2), if you open the Platform.kt under that source
set, you'll see that it is in fact
shared/src/androidMain/kotlin/com/example/myapplication/Platform.kt.
[Android Studio] Chipmunk fixes this issue.

Create a layout inspector *.li file with Android Studio 4.0

In Android Studio 3.x (and before) when I ran the Layout inspector, the view hierarchy was automatically captured and saved in a *.li file. When I start the Layout Inspector in Android Studio 4.0, the view hierarchy is not saved anywhere.
Can I somehow export the view hierarchy from the new Layout Inspector to a file, so I am able to share it with others? For now I can say that I'm only able to open the *.li files in AS 4.0, but not save it.
I found one solution for the above case. You need to type shift two times and then type legacy layout inspector. The old layout inspector will open and you can save its .li file.
I found it useful because I can do it in the Android Studio 4.0.
I can use new feature from Android Studio 4.0 Layout Inspector as well can save .li file using the legacy layout inspector.
Another option is to disable the Live Layout Inspector feature in the Android Studio Preferences window. It can be found in the Experimental section, as in the screenshot below:

Navigation to the Android Studio Tools on Welcome Screen

I am sort of lost on where to find the Tools Menu in Android Studio.
According to this link https://developer.android.com/studio/run/managing-avds.html, I do not have to run an Android Studio project in order to launch the AVD Manager.
Currently, I am on Android Studio Version 3.0 Beta 6.
I would like some guidance on where the Tools Menu is located in which the link above mentions. Pictures would really help and are much appreciated.
While you do not have to run a project to access the AVD manager, you cannot access it in the welcome screen. You must first create or open a project and then you should be able to find what the link is referring to.

Android Studio 2.2.2 preview and design not showing properly

I have recently installed Android Studio 2.2.2. But in the IDE the preview and design window for xml not showing complete mobile-like appearance that I used to view in previous version, rather it is showing only the mobile screen with rulers around. How can I see full featured preview/design? Pls advice.
I was also looking for this, But its new functionally it will look like this by default. only screen and blueprints, No mobile.
https://developer.android.com/studio/write/layout-editor.html

Android Studio - Error: Failed to resolve: com.android.support.constraint:constraint-layout:1.0.0-alpha1

Screen Shot #1 - Android Studio Project Gradle Build View
Screen Shot #2 - Android Studio Project Gradle Sync View
Going through the "Android Studio 2.2 Development Essentials book" and following along with the tutorial in chapter 3. Everything was OK until I completed a task in the Development Essentials book (chapter 3, page 24 in book) that said,
As we can see from the component tree hierarchy, the user interface
layout consists of a layout parent with a single child in the form of
a TextView object. If Android Studio has used a RelativeLayout manager
for the project, the first step is to convert it to a
ConstraintLayout. ConstraintLayout is a new and flexible layout
manager that is used in most projects in this book. To achieve this
conversion, right-click on the content_android_sample entry in the
Component Tree and select the Convert RelativeLayout to
ConstraintLayout menu option as shown below:
Upon completion of the above quoted tutorial task (in chapt. 3 of the Development Essentials book), an error was presented that said:
Error: Failed to resolve: com.android.support.constraint:constraint-layout:1.0.0-alpha1
Also, a rendering error was listed as well that said:
Rendering Problems The following classes could not be found:
- android.support.constraint.ConstraintLayout (    Add constraint-layout library dependency to the project, Fix Build Path, Edit XML, Create Class)
Any thoughts on how to fix this? Please see screen shots attached (above). I'm new to Android Studio.
Thank you very much for your time.
I am using the following OS and Android Studio version below:
Win7 professional 64 bit OS
Android Studio 2.2
Build# AI-145,3330264, Built on October 6, 2016
You need add check in..
exist a icon with name "SDK Manager" just click
open Settings -> Appearance & Behavior -> System Settings -> Android SDK -> SDK Tools
And in this dialog add:
ConstraintLayout for Android
Solver for ConstrainLayout
Then, here only you need close and open Android Studio.
Maybe only you can update to:
compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha8'
Or update your dependency to:
compile 'com.android.support.constraint:constraint-layout:latest_version'
This should solve your error. Go to your build.gradle and change your implementation 'com.android.support.constraint:constraint-layout:1.0.0-beta7' to implementation 'com.android.support.constraint:constraint-layout:2.0.0-beta7' or to any latest

Resources