Thinsky
Thinsky

Reputation: 4246

Rendering Problems in android studio xml files

How to fix the following?

"The following classes could not be instantiated:"

If I don't close this warning the preview cannot show the custom widget, but it's ok when run the project.

Upvotes: 0

Views: 1890

Answers (1)

Emre Aktürk
Emre Aktürk

Reputation: 3346

Studio may have issues to render your custom views which has overwritten onCreate methods.

To avoid this issues, you can add if(isInEditMode) to lines that causes this problem in onCreate.

Good luck there.

Upvotes: 1

Related Questions