Can anyone help how to resolve the preview issue for XML layout file?
Android XML layout preview not working in Android Studio Dolphin 2021.3.1 Patch 1
1.3k views Asked by Faldu Jaldeep At
4
There are 4 answers
0
On
I was getting the same error in version. Android Studio Electric Eel | 2022.1.1 Patch 1
I did the following steps and only one worked for me:
- Invalidate Caches ❌
- Clean Project ❌
- Rebuild Project ❌
- Remove
build
Folder ❌ - Remove
.idea
Folder ✅
Make sure you're using the Android Studio with the latest version.
0
On
Upgrade to Android Studio Flamingo | 2022.2.1. fix the problem.
as you can see here https://developer.android.com/studio/releases/fixed-bugs/studio/2022.2.1
(from my experience, this issue occurred on Dolphin and Electric Eel. Before that, Chipmunk was fine)
Solution # 1
If you are using any Custom-View/Component-View, you must need to set a theme to that view.
Solution # 2
You need to fix these xml errors (maybe
alt + enter
help to fix them)