0

Preview is not showing for some XML files in android studio but the application works fine. In order to develop my application, I need to be able to see all preview properly

I've read several posts in StackOverflow I change style, sdk ,but it doesn't work any way

Here are some rendering error android studio gave me

java.lang.IllegalArgumentException: java.lang.ClassCastException@53dcf95b java.lang.IllegalArgumentException: java.lang.ClassCastException@24df40fa java.lang.IllegalArgumentException: java.lang.ClassCastException@269b81fb

John Joe
  • 12,412
  • 16
  • 70
  • 135
Supagon Srisawas
  • 113
  • 1
  • 1
  • 9

2 Answers2

1

For me I switching to text to design again and again. And sometime switching to preview and gradle at the right corner. This does the trick. Hope it help you

Rajkumar Sharma
  • 554
  • 1
  • 4
  • 9
1

You may try some options:

  • Clean Project
  • Rebuild Project
  • Invalidate caches / Restart
  • Switching Multiple time Text / Design [Answerd by @Rajkumar Sharma]
  • Change API level
  • Change Theme
  • You may close your current project and Open another new to test that the problem is in your current project or in the Android Studio.
  • Check Manifest
Shahadat Hossain
  • 533
  • 7
  • 20