Home > Mobile >  Strategy to debug layout in Android Studio 2021
Strategy to debug layout in Android Studio 2021

Time:07-30

I am new to Android Studio, trying to learn the ropes, as I've inherited and app I need to update. Prior to the changes the app installed fine in both emulator and on my phone.

I made a few changes to the layout file for the main activity. After the changes the app fail to install on the emulator. The installer times out. There are no apparent error messages as to why it fails.

The updates looks fine in the design view, as well as in the Layout Validator. I've scoured the code to see if I could spot any missing closing tag, or duplicate id's etc. but have not found anything.

If I copy back the old xml layout file, the app install again without issue.

Since the app doesn't even install now, how can I go about debugging this issue?

CodePudding user response:

First read the logcat 2nd, comment some parts of code/xml to try what is bad or put some log.d messages to discover up to which portion of code it is ok

CodePudding user response:

It started working again for some reason.

Still no idea why it failed installing in the first place. No errors where listed in any of the log files.

  • Related