exception raised during rendering:Binary XML file line #-1:error inflating class

UPDATE Sep/2016

Issue is no longer reproducible on Android Studio v2.2. Update your Android Studio and the issue will be no longer reproducible.

UPDATE Aug/2016

Issue is still happening in Android Studio v2.1.3

Original Answer

It seems this is an issue and it is being handled by google HERE:

Some other people are facing the same issue and the fix is always to change the preview API from 24 to 23 (or any other version).

You may need to download a previous version of SDK.. You don’t need to change your build.gradle… Just download the SDK and Android Studio will allow you to change the SDK in Layout Preview

enter image description here

Leave a Comment