When creating a checkbox in Android Studio, it gives an error

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

Version of the API downgraded, does not help, or gives a rendering error, or does not display the checkbox at all on the preview.

    2 answers 2

    This is a problem in the studio itself, try to upgrade or use a different design theme or change the api in the studio itself (in the layout preview). But in general , look, the same problem.

      This error appears from 17 - 19 api, the problem is solved if everything is done from the main thread.

      • I mean creating a LayoutInflater object and using it - Ivan R