2

My android studio XML preview is not working, after searching for the cause I found out that my Bottom Navigation is the problem, by changing the app theme it breaks the ui but the preview works again. Until now I tried restarting android studio, updating the material dependency, clearing or invalidating the cache and many more things, but nothing seems to work.

I am using the google material bottom navigation.

NuiDev
  • 131
  • 1
  • 9

1 Answers1

1

A possible solution to solve the Bottom Navigation issue can be :

  1. The project may have an error or a warning regarding your .xml code.
  2. Update your Google Material Dependency and check your Android Studio version also.
  3. The Bottom Navigation theme cannot be compatible, try to switch it to a different one.
  4. Custom styles, attributes or any values can create conflicts with The Bottom Navigation theme.
  5. Update the Design Library to the latest version.

If all these possible solutions fail, try to work on a new different from scratch project using your current code.


Check this links also :

Navigation

Design Preview not Working Fixed

xml preview is not working in android studio

Different Ways to Fix “Android Studio Does not Show Layout Preview”

Update UI components with NavigationUI