When i'm build my React native project using this command
gradlew bundleRelease
Give a big error on Task :app:mergeReleaseResources
FAILURE: Build failed with an exception.
[drawable-hdpi-v4/node_modules_reactnavigation_stack_src_views_assets_backicon] C:\Users\victo\Documents\git\melhor\app-user\android\app\src\main\res\drawable-hdpi\node_modules_reactnavigation_stack_src_views_assets_backicon.png [drawable-hdpi-v4/node_modules_reactnavigation_stack_src_views_assets_backicon] C:\Users\victo\Documents\git\melhor\app-user\android\app\build\generated\res\react\release\drawable-hdpi\node_modules_reactnavigation_stack_src_views_assets_backicon.png: Error: Duplicate resources [drawable-mdpi-v4/node_modules_reactnavigation_stack_src_views_assets_backicon] C:\Users\victo\Documents\git\melhor\app-user\android\app\src\main\res\drawable-mdpi\node_modules_reactnavigation_stack_src_views_assets_backicon.png [drawable-mdpi-v4/node_modules_reactnavigation_stack_src_views_assets_backicon] C:\Users\victo\Documents\git\melhor\app-user\android\app\build\generated\res\react\release\drawable-mdpi\node_modules_reactnavigation_stack_src_views_assets_backicon.png: Error: Duplicate resources [drawable-mdpi-v4/node_modules_reactnavigation_stack_src_views_assets_backiconmask] C:\Users\victo\Documents\git\melhor\app-user\android\app\src\main\res\drawable-mdpi\node_modules_reactnavigation_stack_src_views_assets_backiconmask.png [drawable-mdpi-v4/node_modules_reactnavigation_stack_src_views_assets_backiconmask] C:\Users\victo\Documents\git\melhor\app-user\android\app\build\generated\res\react\release\drawable-mdpi\node_modules_reactnavigation_stack_src_views_assets_backiconmask.png: Error: Duplicate resources [drawable-mdpi-v4/src_assets_address_emptyaddress] C:\Users\victo\Documents\git\melhor\app-user\android\app\src\main\res\drawable-mdpi\src_assets_address_emptyaddress.png [drawable-mdpi-v4/src_assets_address_emptyaddress] C:\Users\victo\Documents\git\melhor\app-user\android\app\build\generated\res\react\release\drawable-mdpi\src_assets_address_emptyaddress.png: Error: Duplicate resources [drawable-mdpi-v4/src_assets_address_faildelivery] C:\Users\victo\Documents\git\melhor\app-user\android\app\src\main\res\drawable-mdpi\src_assets_address_faildelivery.png [drawable-mdpi-v4/src_assets_address_faildelivery] C:\Users\victo\Documents\git\melhor\app-user\android\app\build\generated\res\react\release\drawable-mdpi\src_assets_address_faildelivery.png: Error: Duplicate resources [drawable-mdpi-v4/src_assets_brands_bayer] C:\Users\victo\Documents\git\melhor\app-user\android\app\src\main\res\drawable-mdpi\src_assets_brands_bayer.png [drawable-mdpi-v4/src_assets_brands_bayer]
This error is larger and have more "Duplicated resources".
I see that is a problem with the images i use inside the aplication But that is only one image with those names with the name inside the app, why is "duplicated"?
and other assets like "node_modules_reactnavigation_stack_src_views_assets_backicon" assets on react navigation that i dont have control.
This problem ocurrs because the project builded duplicates files.
To resolve it, you need delete the files inside of res
folder.
Delete drawable
folder and raw
folder.
Your project directory will be like that:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With