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

Duplicate Value Merge Error #44

Closed nicemak closed 3 years ago

nicemak commented 3 years ago

Describe the bug

Library Version: 2.0.0

Expected behavior Should Compile.

nicemak commented 3 years ago

@maxkeppeler sir any help?

maxkeppeler commented 3 years ago

I can't replicate this issue. So I guess an id is the same as another from your values file? Which would that be?

nicemak commented 3 years ago

C:\Users\BI.IT-010.gradle\caches\transforms-2\files-2.1\2ccd1e7c841bb979159f85186e44dbc7\preference-1.1.1\res\values\values.xml:257:5-336:25: AAPT: error: duplicate value for resource 'attr/defaultValue' with config ''.

and

C:\Users\BI.IT-010.gradle\caches\transforms-2\files-2.1\2ccd1e7c841bb979159f85186e44dbc7\preference-1.1.1\res\values\values.xml:257:5-336:25: AAPT: error: resource previously defined here.

on clicking on these errors, this file opens.

may be some other library is conflicting with your library resources.

nicemak commented 3 years ago

may be this dependency causing issue,

preference: "androidx.preference:preference-ktx:1.1.1"

which is present in your core library, may be some other library is also using this.

maxkeppeler commented 3 years ago

There's no attr with "defaultValue" in the values.xml. There's also no conflicting attrs, the sheet library's names start with "sheet...". Indeed, I use the preference library, so the fragment manager can be taken out of the context in the PreferenceFragmentCompat. I don't really know how to fix this for now - I will attempt to try some things out on the weekend.

maxkeppeler commented 3 years ago

Sorry, I can't replicate it and don't know how to continue with this issue you have. If you know anything else, let me know.

nicemak commented 3 years ago

Hi there!

i solved my issue by excluding preference library from your library, now its working wonderfully.

implementation ('com.maxkeppeler.sheets:core:2.0.0') { exclude group: 'androidx.preference', module: 'preference-ktx' } implementation ('com.maxkeppeler.sheets:input:2.0.0') { exclude group: 'androidx.preference', module: 'preference-ktx' }

maxkeppeler commented 3 years ago

Nice! However, I wonder how I can fix this on my end. I only need it in order to get the FragmentManager from the PreferenceContext. But it seems like the whole library is leaking?