navasmdc / MaterialDesignLibrary

This is a library with components of Android L to you use in android 2.2
Apache License 2.0
8.99k stars 2.22k forks source link

api level 16 checkbox exception #308

Open ghost opened 9 years ago

ghost commented 9 years ago

I get "android.view.InflateException: Binary XML file line #99: Error inflating class com.gc.materialdesign.views.CheckBox" when I use a CheckBox in the emulator with API level 16. This error is caused by: "java.lang.NoSuchMethodError: android.view.View.generateViewId". Has anybody faced this issue as well? I tried it on api 19 and worked perfectly. I would appreciate some help to solve this issue.

mattkhaw commented 9 years ago

There's one right here. https://github.com/navasmdc/MaterialDesignLibrary/issues/299

The only solution that I can think of is using another library for the checkbox.

Spiderbezno commented 8 years ago

I have the same problem, the description of library say that is compatible since android 2.2(api 8)

connonfodder commented 7 years ago

I just delete "checkView.setId(View.generateViewId());" at com.gc.materialdesign.views.CheckBox#setAttributes line 75 and it works for me.