2

I've got Android Studio version 3.5, for some of the XML files there are multiple problems. No matter if I create layout file, or drawable file, preview is not working, and Android Studio is not suggesting attributes.

I've tried Rebuilding / Invalidate Cashes and Restart / changing style.xml / even reinstalling Android Studio, nothing works. After I right click layout directory and create new Layout file IDE looks like this:

enter image description here

As you can see, it does not suggest id attribute and on the right, there are no emulators it could use for showing preview.

Do you have any suggestions what could be wrong? This is not the case for all of the XML files. Some of them, created earlier by my coworkers work fine. The problem is only with those I've created myself.

Karzel
  • 928
  • 9
  • 24
  • Have you tried changing the `` value in the selected `Android` version in your `design` tab? – CodeRed Sep 23 '19 at 05:23
  • If I expand there is only `Autmatically Pick Best` option. No Emulator are avialable (I've got plenty of them created). – Karzel Sep 23 '19 at 05:24
  • Then try to check your `AVD Manager` and see what's in there – CodeRed Sep 23 '19 at 05:26
  • I don't know what you want me to see in there, as I said, I have plenty of emulators created. EDIT, tried reinstalling Android Studio, didn't help either – Karzel Sep 23 '19 at 05:32
  • Possible duplicate of [Android Studio does not show layout preview](https://stackoverflow.com/questions/34499839/android-studio-does-not-show-layout-preview) – Malith Pamuditha Fernando Sep 23 '19 at 09:11

1 Answers1

0

try to add Base. to the parent. it works for me in android 3.2

<style name="AppTheme" parent="Base.Theme.AppCompat.Light.DarkActionBar">

refer this Line:Android Studio does not show layout preview

YuvrajsinhJadeja
  • 1,383
  • 7
  • 23