Search code examples
androidandroid-theme

Android Studio adding theme material light getting error missing style


Android Studio getting error while adding theme material light theme the error is

Missing style one or more layout is missing the layout_width or layout_height. Here is the error snapshot

the snapshot of the error I am getting.


Solution

  • As the message suggests, the layout that you're viewing is using styles that are not present in the theme that the android studio previewer using to show your layout.

    There's a combo box above the preview that allows you to choose which theme the previewer will use. You can select the desired theme (material light) to preview with that theme.