maxkeppeler / sheets

⭐ ‎‎‎‏‏‎ ‎Offers a range of beautiful sheets (dialogs & bottom sheets) for quick use in your project. Includes many ways to customize sheets.
https://maxkeppeler.github.io/sheets/
Apache License 2.0
923 stars 77 forks source link

Do I need to enable Databinding for this library to work?? #6

Closed ubarua123 closed 3 years ago

ubarua123 commented 3 years ago
java.lang.NoClassDefFoundError: Failed resolution of: Landroidx/databinding/DataBinderMapperImpl;
        at androidx.databinding.DataBindingUtil.<clinit>(DataBindingUtil.java:32)
        at androidx.databinding.DataBindingUtil.getDefaultComponent(DataBindingUtil.java:65)
        at com.maxkeppeler.bottomsheets.databinding.BottomSheetsViewButtonsBinding.bind(BottomSheetsViewButtonsBinding.java:81)
        at com.maxkeppeler.bottomsheets.databinding.BottomSheetsBaseBinding.bind(BottomSheetsBaseBinding.java:71)
        at com.maxkeppeler.bottomsheets.databinding.BottomSheetsBaseBinding.inflate(BottomSheetsBaseBinding.java:57)
        at com.maxkeppeler.bottomsheets.core.BottomSheet.onCreateView(BottomSheet.kt:255)
maxkeppeler commented 3 years ago

The library uses data and view binding. Your app doesn't need to use that. I guess, you missed adding the dependency to the core module, right?

implementation 'com.maxkeppeler.bottomsheets:core:<latest-version>'

This core module is the base for all the other bottom sheets, therefore it needs to be included.

maxkeppeler commented 3 years ago

I tried it out and removed the core module but included the info module on a fresh project. But even after adding the core module back, the warning persists.

The library has the feature dataBinding included, but doesn't make use of it anymore. I will remove it therefore.

If the library only uses viewBinding, in theory the warning shouldn't appear anymore - since it doesn't contain dataBinding anymore.

Sorry for the issue!