After upgrading to React Native 0.57 i am facing an issue when genrating APK in react-native-router-flux.when executing the .gradlew assembleRelease i get below error :-
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:mergeReleaseResources'.
> [drawable-mdpi-v4/node_modules_reactnativerouterflux_images_back_chevron]
R:Workingslisecappsandroidrepoest-react-
nativevenutestandroidappsrcmain
esdrawable-
mdpi
ode_modules_reactnativerouterflux_images_back_chevron.png
[drawable-mdpi-v4/node_modules_reactnativerouterflux_images_back_chevron]
R:Workingslisecappsandroidrepoest-react-
emirnativevenutestandroidappuildgenerated
es
eact
eleasedrawable-
mdpi-v4
ode_modules_reactnativerouterflux_images_back_chevron.png: Error:
Duplicate resources
[drawable-mdpi-v4/node_modules_reactnativerouterflux_images_menu_burger]
R:Workingslisecappsandroidrepoest-react-nat
ivevenutestandroidappsrcmain
esdrawable-
mdpi
ode_modules_reactnativerouterflux_images_menu_burger.png
[drawable-mdpi-v4/node_modules_reactnativerouterflux_images_menu_burger]
R:Workingslisecappsandroidrepoest-react-
nativevenutestandroidappuildgenerated
es
eact
eleasedrawable-mdpi-
v4
ode_modules_reactnativerouterflux_images_menu_burger.png: Error:
Duplicate resources
I tried the following to resolve but still same error :-
- Tried to create script as said in the first answer here to avoid duplicate copying of asset
images.
- Deleted the whole app/build folder
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…