navigation drawer issue (not showing layout preview)

Remove the line

tools:showIn="navigation_view"

from activity_main_drawer.xml and rebuild. This solved the same problem for me. Don't know why!!!

Problem solved in AS 3.1.3(8 June 2018) and reappeared again (16 June 2018)!!!

New temporary workaround:

  1. Cut the line tools:showIn="navigation_view" from the menu file.
  2. Close the menu file.
  3. Reopen it and paste the line.
  4. Go to design and see the menu as it should be.

If you close the menu file and reopen it the problem comes back! Still no preview in Text.


Because you extend AppCompatActivity, you need to make sure that in your styles.xml your AppTheme is a descendant of AppCompat

    <style name="AppTheme" parent="Theme.AppCompat.Light.DarkActionBar">
    <!-- Customize your theme here. -->
    <item name="colorPrimary">@color/colorPrimary</item>
    <item name="colorPrimaryDark">@color/colorPrimaryDark</item>
    <item name="colorAccent">@color/colorAccent</item>
     </style>

That worked for me while the accepted answer for not that helping.


You can try the following:

  • Run Build then try to see the preview again

  • Close the current layout,open another then reopen again