java – Unable to find UI designer in the new Android Studio-ThrowExceptions

Exception or error:

I have downloaded the new android studio that has been released recently. I am unable to find the UI design preview for the xml, as it is in eclipse. Any help or suggestions on that?

How to solve:

Open a xml layout file:

  • at the bottom, you have two tabs: Design/Text enter image description here
  • in design mode, you see the preview directly
  • in text mode, the preview is (by default) on the right, toggled by a ‘Preview’ button in the rightmost bar

enter image description here

You can also show/hide it with View > Tool Windows > Preview

EDIT

Attention: the IDE only displays the preview if editing a layout file in the res/layout* directory of an Android project. In particular, it won’t be displayed if editing a file in build/res/layout* since those are not source directory but output directory.

The Resource folder is set automatically, and can be viewed (and changed) in Project Structure > Modules > [Module name] > Android > Resources directory.

Leave a Reply

Your email address will not be published. Required fields are marked *