androidPluto / pluto

Android Pluto is a on-device debugging framework for Android applications, which helps intercept Network calls, capture Crashes & ANRs, manipulate application data on-the-go, and much more.
https://androidpluto.com
Apache License 2.0
673 stars 67 forks source link

Duplicate value for Resource #103

Closed jimlyas closed 2 years ago

jimlyas commented 2 years ago

Describe the bug

After adding the library to build.gradle every time i build, there's error claiming duplicate values for defaultValues

* What went wrong:
Execution failed for task ':app:mergeDevDebugResources'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > Android resource compilation failed
     C:\Users\User\.gradle\caches\transforms-2\files-2.1\e013974637a7524419b1493618a99d2d\preference-1.1.1\res\values\values.xml:257:5-336:25: AAPT: error: duplicate value for resource 'attr/defaultValue' with config ''.

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

     D:\#KERJAAN\useetvgo\app\build\intermediates\incremental\mergeDevDebugResources\merged.dir\values\values.xml: AAPT: error: file failed to compile.

To Reproduce

Expected behavior

The app build successfully

Screenshots

image

Smartphone (please complete the following information):

Additional context

My guess is there's duplicate variable name in my project, that used in this library. the defaultValues variable i used in my project is from this library

srtvprateek commented 2 years ago

hey @jimlyas, happening due to colliding attr definition in one of the dependencies androidx.preference:preference-ktx:1.1.1, a property SeekBarPreference is defined with attr min, which is conflicting with your value.

as a general practice, you can rename the attr key to something with does not conflict with any of the dependencies.

ref: https://github.com/mocklets/pluto/issues/23