Supagon Srisawas
Supagon Srisawas

Reputation: 113

Preview is not showing for some activity

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

Upvotes: 0

Views: 433

Answers (2)

Shahadat Hossain
Shahadat Hossain

Reputation: 543

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

Upvotes: 1

Rajkumar Sharma
Rajkumar Sharma

Reputation: 584

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

Upvotes: 1

Related Questions