Why is Android Studio preview is not showing?
Your xml file does not have issue.It is not showing preview because it is not compiled properly
You have Gradle Sync issue.
Pleas fix that first.
How to?
okay here's very lightweight solution with steps:
Ctrl+Alt+Shift+S or File->Project Structure
Select Project from left panel
Now check your Gradle Version at right panel
In my case my Gradle Version is 3.3
Navigate C:\Users\Malith.gradle\caches and delete your Gradle Version - 3.3 named folder.
Now restart or open your project again from workspace.
Greetings...your problem is solved.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.