BuildException duplicate resource

Hello, i recently upgrade my android studio gradle to 4.1 and since then I have been unable to compile my project. I keep getting this error Error:Execution failed for task:paylater:transformResourcesWithMergeJavaResForFullDebug> More than one file was found with OS independent path layout/permissionfeedback.xml
But when I use the previous version of gradle it all works fine. Though it says duplicate resources but why are those resources being caught in the previous version? Though am unable to locate these duplicates so it’s strange.