Questions tagged [layout-inspector]

49 questions
56
votes
2 answers

Does Android Studio have a Hierarchy Viewer or Layout Inspector?

I tried searching on here but couldn't find the answer. I'm looking for a way to launch the Hierarchy Viewer from within Android Studio, rather than having to launch it at the command-line. I've recently migrated to Android Studio from Eclipse, and…
Carl Anderson
  • 3,446
  • 1
  • 25
  • 45
42
votes
9 answers

Can't start Android Studio Layout Inspector: "Unexpected error: empty view hierarchy"

Can't seem to launch Layout Inspector on Android Studio 3.0 (Canary 3) When connected to my device and app running, choosing Tools > Android > Layout Inspector comes up with the following error dialog: "Error obtaining view hierarchy: Unexpected…
Marchy
  • 3,334
  • 5
  • 37
  • 27
21
votes
3 answers

Jetpack Compose: The layout inspector is not showing the menu for recomposition counts

Android Studio Bumblebee Patch 3 From this page, it says that I can see recomposition counts: https://developer.android.com/jetpack/compose/tooling#recomposition-counts It does not show the menu option to me. Only the device name and "Stop…
21
votes
3 answers

Android Layout Inspector fails with timeout error

When I try to inspect my application's layout in a simulator, by going Tools => Layout Inspector, it always fails with one of the errors: 1. Error obtaining view hierarchy: There was a timeout error capturing the layout data from the device. …
Simon Moshenko
  • 2,028
  • 1
  • 15
  • 36
12
votes
1 answer

Layout inspector not showing compose nodes

Trying to inspect my pure Compose app in the layout inspector shows the screen without any layout node information. No errors in the logs. This happens on both real devices and emulators. I have tried Android Studio Bumblebee (latest patch) and…
bompf
  • 1,374
  • 1
  • 18
  • 24
12
votes
2 answers

How can I use Layout Inspector for apps installed from Google Play?

I was trying to use LayoutInspector for apps from Google Play. I have a rooted device so when I do "Show all processes", all the running apps developed by me are displayed but not the official ones.
Sunil
  • 541
  • 2
  • 8
  • 17
10
votes
1 answer

Layout Inspector - How to find text element's current font

After taking a snapshot of the layout and inspecting it with Layout Inspector, how do I find what font is used for the selected TextView or AppCompatTextView? Text and Theme property groups have no mentions of fontFamily property. However, I see the…
10
votes
1 answer

"Error obtaining view hierarchy: Unexpected error: empty view hierarchy" when launch Layout Inspector

I get the error message when I launch Layout Inspector: "Error obtaining view hierarchy: Unexpected error: empty view hierarchy". Also in Logcat there is an exception: 12-10 23:46:56.812 18833-18840/com.tst.nikita.yandextranslater I/art: Exception…
8
votes
1 answer

Android Studio Bumblebee Layout inspector live rendering not working

Layout inspector live inspection stopped working when I upgraded my Android studio to Bumblebee 2021.1.1. Patch 2. It used to work before. It shows "Activity must be hardware accelerated for live inspection" I added hardwareAcceleration to true for…
Madhan
  • 361
  • 4
  • 17
8
votes
0 answers

Unable to detect a live inspection service. To enable live inspections, restart the device

Anybody who has had same problem with android studio and found a solution please share solution. Android Studio Version: Android Studio Arctic Fox | 2020.3.1 Patch 2 Build #AI-203.7717.56.2031.7678000, built on August 27, 2021 Runtime version:…
5
votes
2 answers

Can not use compose inspector in Android Studio (Flamingo 2022.2.1)

The device's network is working, but as the screenshot shows, I can't connect to the URL: maven.google.com, causing the compose checker to not work properly. I tried to modify the version for older versions of Compose but it did not solve the…
5
votes
5 answers

Compose inspection unavailable. Could not determine the version of the androidx.compose.ui:ui artifact. Try a different version of compose

I'm getting the error message above when trying to use Layout inspector on my Project when I'm using Android Studio Giraffe | 2022.3.1 Canary 6. I also tried it with Android Studio Electric Eel | 2022.1.1 Patch 1. There I only get the error message:…
5
votes
1 answer

android layout inspector don't show in preview not working

In android studio when we use layout inspector we have a hierarchy viewer panel on the left. I see in tutorials if we right click on view in hierarchy viewer we have a disable show in preview item which makes preview disable. but in my android…
max
  • 5,963
  • 12
  • 49
  • 80
4
votes
2 answers

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…
mrpasqal
  • 1,000
  • 1
  • 6
  • 26
4
votes
1 answer

StringIndexOutOfBoundsException: String index out of range: When using a "Android Layout Inspector"

Everytime I use the Android Layout Inspector, I got that error, that doesn't allow me to make the inspection of my Page. StringIndexOutOfBoundsException: String index out of range:5101 In this page a have a Very Long TextView, I think this could be…
Johana Lopez 1327
  • 165
  • 1
  • 3
  • 14
1
2 3 4