React Native 0.57.1​​ Android 重复资源

IT技术 android reactjs react-native
2021-04-21 12:53:26

运行时./android/gradlew assembleRelease出现以下错误:

``` * 出了什么问题:任务“:app:mergeReleaseResources”执行失败。

[drawable-xhdpi-v4/node_modules_reactnavigation_src_views_assets_backicon] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/src/main/res/drawable-xhdpi/node_modules_reactnavigation_src_views. v4/node_modules_reactnavigation_src_views_assets_backicon] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/build/generated/res/react/release/drawable-xhdpi/node_modules_reactnavigation_src_views.png resources:Error drawable-xxhdpi-v4/node_modules_reactnavigation_src_views_assets_backicon] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/src/main/res/drawable-xxhdpi/node_modules_reactnavigation_src_backicon.png [drawable-xxhdpi-v4/node_modules_reactnavigation_src_views_assets_backicon] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/build/generated/res/react/release/drawable-xxhdpi/node_modules_reactnavigation.png : 错误:重复资源 [drawable-hdpi-v4/node_modules_reactnavigation_src_views_assets_backicon] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/src/main/res/drawable-hdpi/node_modules_reactbackviews_png [drawable-hdpi-v4/node_modules_reactnavigation_src_views_assets_backicon] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/build/generated/res/react/release/drawable-hdpi/node_modules_reactnavigation_icons_src_icons:错误:重复的资源 [drawable-mdpi-v4/app_assets_images_characters_marilyn_monroe_trophies_cookoo30x] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/src/main/res/drawable-mdpi/app_assets_characteryctrophies_png_characterlye_images0 mdpi-v4/app_assets_images_characters_marilyn_monroe_trophies_cookoo30x] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/build/generated/res/react/release/drawable-mdpi/app_assets_imagely_characters_pngroyc_characters:o资源 [drawable-mdpi-v4/app_assets_images_characters_cleopatra_emotions_blinking_5] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/src/main/res/drawable-mdpi/app_assets_images_link_characters_cleops_motiona.png [drawable-mdpi-v4/app_assets_images_characters_cleopatra_emotions_blinking_5]/Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/build/generated/res/react/release/drawable-mdpi/app_characterssing_blinking_images.png :错误:重复资源 [drawable-mdpi-v4/app_assets_images_coins_5] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/src/main/res/drawable-mdpi/app_assets_images_coins_5.png [drawable-mdpi-v4/app_assets_images_coins_5] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/build/generated/res/react/release/drawable-mdpi/app_assets_images_coins_5.png:错误:重复的资源 [drawable-mdpi-v4/app_assets_images_characters_marilyn_monroe_emotions_blinking_2] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/src/main/res/drawable-mdpi/app_assets_characterlyeblinking_images mdpi-v4/app_assets_images_characters_marilyn_monroe_emotions_blinking_2] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/build/generated/res/react/release/drawable-mdpi/app_assets_png_images_characters:link_middle_characters:link_blinking_characters资源 [drawable-mdpi-v4/app_assets_images_characters_leonardo_da_vinci_emotions_angry_4]/Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/src/main/res/drawable-mdpi/app_assets_vinci_characters_images_characterspng [drawable-mdpi-v4/app_assets_images_characters_leonardo_da_vinci_emotions_angry_4] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/build/generated/res/react/release/drawable-mdpi_images_characters_png/drawable-mdpi_vinci_characters. : 错误: 重复资源 [drawable-mdpi-v4/app_assets_images_characters_leonardo_da_vinci_emotions_happy_2] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/src/main/res/drawable-mdpi_images_characters_png_motion_characters_png [drawable-mdpi-v4/app_assets_images_characters_leonardo_da_vinci_emotions_happy_2]/Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/build/generated/res/react/release/drawable-mdpi_imageshap_charactersle_images_character_assets.png:错误:重复资源 [drawable-mdpi-v4/app_assets_images_unlockablecharacters] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/src/main/res/drawable-mdpi/app_assets_images_unlockablecharacters。 png [drawable-mdpi-v4/app_assets_images_unlockablecharacters] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/build/generated/res/react/release/drawable-mdpi/app_assets_images_unlockablecharacters.png :错误:重复资源 [drawable-mdpi-v4/app_assets_images_characters_cleopatra_emotions_happy_6] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/src/main/res/drawable-mdpi/app_assets_characters_characters_characters_imagespng [drawable-mdpi-v4/app_assets_images_characters_cleopatra_emotions_happy_6] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/build/generated/res/react/release/drawable-mdpi/app_assets_character_png_characters_png_images : 错误: 重复资源 [drawable-mdpi-v4/app_assets_images_characters_marilyn_monroe_trophies_cookoo3x] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/src/main/res/drawable-mdpi/appies_characterously.png_characterously_assetsro [drawable-mdpi-v4/app_assets_images_characters_maryn_monroe_trophies_cookoo3x] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/build/generated/res/react/release/drawable-mdpi/app_assets_charactersrooken3x:错误:重复的资源 [drawable-mdpi-v4/app_assets_images_characters_leonardo_da_vinci_emotions_happy_3] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/src/main/res/drawable-mdpi/app_charactersdashappy_images_png_charactersdpi/app_charactersdashapy_images mdpi-v4/app_assets_images_characters_leonardo_da_vinci_emotions_happy_3] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/build/generated/res/react/release/drawable-mdpi/app_assets_motions_happy_characters:资源 [drawable-mdpi-v4/app_assets_images_characters_leonardo_da_vinci_emotions_angry_5] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/src/main/res/drawable-mdpi/app_assets_vinci_characters_characters_imagespng [drawable-mdpi-v4/app_assets_images_characters_leonardo_da_vinci_emotions_angry_5] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/build/generated/res/react/release/drawable-mdpi_images_characters_png/drawable-mdpi_vinci_characters_characters_png : 错误: 重复资源 [drawable-mdpi-v4/app_assets_images_characters_marilyn_monroe_emotions_blinking_3] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/src/main/res/drawable-mdpi/applyn_charactersro [drawable-mdpi-v4/app_assets_images_characters_marilyn_monroe_emotions_blinking_3] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/build/generated/res/react/release/drawable-mdpi/app_characterssroye_images_linking_imagesropng:错误:重复资源 [drawable-mdpi-v4/app_assets_images_coinsmodal_mostpopularlabel] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/src/main/res/drawable-mdpi/app_assets_images_labelsmodal_mostpop png [drawable-mdpi-v4/app_assets_images_coinsmodal_mostpopularlabel] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/build/generated/res/react/release/drawable-mdpi/app_assets_images_coinsmodal_mostpopular :错误:重复资源[drawable-mdpi-v4/app_assets_images_characters_cleopatra_emotions_blinking_4] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/src/main/res/drawable-mdpi/app_linkcharacterseblinking_images.png [drawable-mdpi-v4/app_assets_images_characters_cleopatra_emotions_blinking_4] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/build/generated/res/react/release/drawable-mdpi/app_characterssing_blinking_images.png :错误:重复资源 [drawable-mdpi-v4/app_assets_images_coins_4] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/src/main/res/drawable-mdpi/app_assets_images_coins_4.png [drawable-mdpi-v4/app_assets_images_coins_4] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/build/generated/res/react/release/drawable-mdpi/app_assets_images_coins_4.png:错误:重复资源 [drawable-mdpi-v4/app_assets_images_characters_napoleon_trophies_cookoo30x] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/src/main/res/drawable-mdpi/app_assets_images_characters_characters0 mdpi-v4/app_assets_images_characters_napoleon_trophies_cookoo30x] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/build/generated/res/react/release/drawable-mdpi/app_assets_images_characters_characters_naplicates_characters_naplicated资源 [drawable-mdpi-v4/app_assets_images_earthbg] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/src/main/res/drawable-mdpi/app_assets_images_earthbg。png [drawable-mdpi-v4/app_assets_images_earthbg] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/build/generated/res/react/release/drawable-mdpi/app_assets_images_earthbg.png : 错误:重复资源 [drawable-mdpi-v4/app_assets_images_characters_einee_emotions_happy_6] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/src/main/res/drawable-mdpi/app_assets_png_images_characters [drawable-mdpi-v4/app_assets_images_characters_einee_emotions_happy_6] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/build/generated/res/react/release/drawable-mdpi/app_assets_images_characters_characters错误:重复资源 [drawable-mdpi-v4/app_assets_images_characters_einee_trophies_angry10x] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/src/main/res/drawable-mdpi/app_assets_images_characters_characters_angrye mdpi-v4/app_assets_images_characters_einee_trophies_angry10x] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/build/generated/res/react/release/drawable-mdpi/app_assets_images_characters_angrye10资源 [drawable-mdpi-v4/app_assets_images_characters_leonardo_da_vinci_trophies_3conversations] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/src/main/res/drawable-mdpi/app_assets_images_vinci_characters_characters.png [drawable-mdpi-v4/app_assets_images_characters_leonardo_da_vinci_trophies_3conversations]/Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/build/generated/res/react/release/drawable-mdpi/app_characters_png_characters_characters_png :错误:重复资源 [drawable-mdpi-v4/app_assets_images_characters_napoleon_trophies_cookoo10x] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/src/main/res/drawable-mdpi/app_assets_characteroo10xp [drawable-mdpi-v4/app_assets_images_characters_napoleon_trophies_cookoo10x] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/build/generated/res/react/release/drawable-mdpi/app_assets_images_character_10错误:重复资源 [drawable-mdpi-v4/app_assets_images_characters_einee_emotions_angry_2] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/src/main/res/drawable-mdpi/app_assets_images_characters2 drawable-mdpi-v4/app_assets_images_characters_einee_emotions_angry_2] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/build/generated/res/react/release/drawable-mdpi/app_assets_images_angry2_characters.Error :重复资源 [drawable-mdpi-v4/app_assets_images_characters_napoleon_profile] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/src/main/res/drawable-mdpi/app_assets_images_characters_napoleon_profile.png [drawable-mdpi-v4/app_assets_images_characters_napoleon_profile]/Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/build/generated/res/react/release/drawable-mdpi/app_assets_images_characters_napoleon_profiles_napoleon_profile : 错误:重复资源 [drawable-mdpi-v4/app_assets_images_characters_einee_emotions_happy_4] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/src/main/res/drawable-mdpi/app_assets_png_characters [drawable-mdpi-v4/app_assets_images_characters_einee_emotions_happy_4] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/build/generated/res/react/release/drawable-mdpi/app_assets_images_characters_4错误:重复资源 [drawable-mdpi-v4/app_assets_images_characters_einee_trophies_angry30x] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/src/main/res/drawable-mdpi/app_assets_images_characters_characters_angrye mdpi-v4/app_assets_images_characters_einee_trophies_angry30x] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/build/generated/res/react/release/drawable-mdpi/app_assets_images_characters_angrye3Error资源 [drawable-mdpi-v4/app_assets_images_coins_6] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/src/main/res/drawable-mdpi/app_assets_images_coins_6。png [drawable-mdpi-v4/app_assets_images_coins_6] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/build/generated/res/react/release/drawable-mdpi/app_assets_images_coins_6.png :错误:重复资源 [drawable-mdpi-v4/app_assets_images_characters_cleopatra_emotions_blinking_6] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/src/main/res/drawable-mdpi/app_linkcharacterseblinking_images. [drawable-mdpi-v4/app_assets_images_characters_cleopatra_emotions_blinking_6]/Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/build/generated/res/react/release/drawable-mdpi/app_assets_cleopatra_emotions_blinking_characters:错误:重复资源 [drawable-mdpi-v4/app_assets_images_characters_einee_bg] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/src/main/res/drawable-mdpi/app_assets_images_characters_einee_bg.jpg mdpi-v4/app_assets_images_characters_einee_bg] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/build/generated/res/react/release/drawable-mdpi/app_assets_images_characters_einee_bg.jpg:错误资源 [drawable-mdpi-v4/app_assets_images_characters_cleopatra_emotions_cookoo_2] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/src/main/res/drawable-mdpi/app_assets_images_characters_cookooe2.png [drawable-mdpi-v4/app_assets_images_characters_cleopatra_emotions_cookoo_2] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/build/generated/res/react/release/drawable-mdpi/app_charactersookecleops.png_characters_toookes_images. : 错误:重复资源 [drawable-mdpi-v4/app_assets_images_characters_leonardo_da_vinci_emotions_blinking_3] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/src/main/res/drawable-mdpi_characters_images_characters_images_linking_3_3png [drawable-mdpi-v4/app_assets_images_characters_leonardo_da_vinci_emotions_blinking_3] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/build/generated/res/react/release/drawable-mdpis_characters_characters_pnge/drawable-mdpis_characters_images_characters_blinking_apps_pnge : 错误:重复资源 [drawable-mdpi-v4/app_assets_images_characters_cleopatra_emotions_happy_4] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/src/main/res/drawable-mdpi/app_assets_character_png_charp_character_images [drawable-mdpi-v4/app_assets_images_characters_cleopatra_emotions_happy_4] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/build/generated/res/react/release/drawable-mdpi/app_assets_leopatra_emotions_happy_characters:错误:重复资源 [drawable-mdpi-v4/app_assets_images_characters_cleopatra_emotions_angry_2] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/src/main/res/drawable-mdpi/app_assets_images_characters_cleopatra_cleopatra_cleopatra_characters_cleope mdpi-v4/app_assets_images_characters_cleopatra_emotions_angry_2] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/build/generated/res/react/release/drawable-mdpi/app_assets_images_characters_png_angry_motions_characters_cleops资源 [drawable-mdpi-v4/app_assets_images_characters_leonardo_da_vinci_trophies_allconversations1x]/Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/src/main/res/drawable-mdpi/app_assets_characters_characters_characters_characters_images_png [drawable-mdpi-v4/app_assets_images_characters_leonardo_da_vinci_trophies_allconversations1x] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/build/generated/res/react/release/drawable-mdpis_characters_png_characters_png_characters_png/drawable-mdpis_characters_characters_characters_characters_apps_png :错误:重复资源 [drawable-mdpi-v4/app_assets_images_coinsmodal_coins500] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/src/main/res/drawable-mdpi/app_assets_images_coinsmodal_coins500 [drawable-mdpi-v4/app_assets_images_coinsmodal_coins500] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/build/generated/res/react/release/drawable-mdpi/app_assets_images_coinsmodal.png:coins50错误:重复资源 [drawable-mdpi-v4/app_assets_images_characters_cleopatra_emotions_angry_3] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/src/main/res/drawable-mdpi/app_assets_images_characters_cleopatra_characters_cleopatra_cleope mdpi-v4/app_assets_images_characters_cleopatra_emotions_angry_3] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/build/generated/res/react/release/drawable-mdpi/app_assets_images_characters_png_angry_motions_characters_angrys.cleopa资源 [drawable-mdpi-v4/app_assets_images_characters_cleopatra_emotions_happy_5] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/src/main/res/drawable-mdpi/app_assets_images_characters_characters_cleopatrapng [drawable-mdpi-v4/app_assets_images_characters_cleopatra_emotions_happy_5] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/build/generated/res/react/release/drawable-mdpi/app_assets_character_graph_graph_graph_graph_images : 错误: 重复资源 [drawable-mdpi-v4/app_assets_images_characters_leonardo_da_vinci_emotions_blinking_2] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/src/main/res/drawable-mdpi_characters_png_images_characters_png/drawable-mdpis_characters_blinking_blinking_app [drawable-mdpi-v4/app_assets_images_characters_leonardo_da_vinci_emotions_blinking_2] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/build/generated/res/react/release/drawable-mdpi_vinci_emotions_blinking_2png: 错误: 重复资源 [drawable-mdpi-v4/app_assets_images_characters_cleopatra_emotions_cookoo_3] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/src/main/res/drawable-mdpi/app_charactersoossets_images. png [drawable-mdpi-v4/app_assets_images_characters_cleopatra_emotions_cookoo_3] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/build/generated/res/react/release/drawable-mdpi/app_charactersoogecleops.png_charactersooke_images. : 错误:重复资源 [drawable-mdpi-v4/app_assets_images_characters_einee_trophies_angry100x] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/src/main/res/drawable-mdpi/app_assets_characters_characters100xpng [drawable-mdpi-v4/app_assets_images_characters_einee_trophies_angry100x]/Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/build/generated/res/react/release/drawable-mdpi/app_assets_characters_characters_angry100x : 错误:重复资源 [drawable-mdpi-v4/app_assets_images_characters_donald_trump_bg] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/src/main/res/drawable-mdpi/app_assets_images_drump_characters [drawable-mdpi-v4/app_assets_images_characters_donald_trump_bg] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/build/generated/res/react/release/drawable-mdpi/app_assets_images_characters_trump_donald错误:重复的资源 [drawable-mdpi-v4/app_assets_images_characters_cleopatra_trophies_allconversations3x] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/src/main/res/drawable-mdpi/app_assets_cleopatra_trophies_allconversations3x mdpi-v4/app_assets_images_characters_cleopatra_trophies_allconversations3x] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/build/generated/res/react/release/drawable-mdpi/app_assets_images_characters_characters3x:traversations3x]重复的资源 [drawable-mdpi-v4/app_assets_images_characters_leonardo_da_vinci_emotions_angry_6] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/src/main/res/drawable-mdpi/app_characterssdasle_images.png mdpi-v4/app_assets_images_characters_leonardo_da_vinci_emotions_angry_6] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/build/generated/res/react/release/drawable-mdpi/app_assets_motions_angry_characters:Du资源```png [drawable-mdpi-v4/app_assets_images_characters_leonardo_da_vinci_emotions_angry_6] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/build/generated/res/react/release/drawable-mdpi_images_characters_png/drawable-mdpi_vinci_characters_png/drawable-mdpionry_characters_png :错误:重复资源```png [drawable-mdpi-v4/app_assets_images_characters_leonardo_da_vinci_emotions_angry_6] /Users/Ilyakar/Documents/Business/Development/My_Projects/new/Einee/App/android/app/build/generated/res/react/release/drawable-mdpi_images_characters_png/drawable-mdpi_vinci_characters_png/drawable-mdpionry_characters_png :错误:重复资源```

我已经从我在React Native Duplicate 资源上找到的答案中尝试了以下方法,但成功率为零:

尝试#1:

“使用 rm -rf android/app/src/main/res/drawable-* 删除可绘制对象并在 Android Studio 上生成 APK 对我有用。”

尝试#2:

“rm -rf android/app/src/main/res/drawable-*

react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src /主要/资源/

并再次编译 android react-native run-android”


还有其他想法吗?

6个回答

这是简单的解决方案:

  1. 删除android/app文件夹内的构建
  2. 删除android文件夹内的构建
  3. rm -rf $HOME/.gradle/caches/
  4. 打开 build.gradle --> android/app/build.gradle
  5. 评论这一行

//apply from: "../../node_modules/react-native/react.gradle"

  1. index.android.bundle从资产文件夹中删除文件并使用重新创建 react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res

  2. react-native run-android react-native run-android --variant=release

快乐编码..

这为我解决了这个问题。但是运行react-native run-android --variant=release不会更新任何代码更改。删除 index.android.bundle(为什么它甚至在android/app/src/main/assets/?看起来很奇怪)会导致构建立即崩溃并出现以下错误:stackoverflow.com/questions/55441230/... 这是预期的行为吗?它会使该命令变得毫无用处。
2021-05-22 12:53:26
我达到了第 1 点。5. 既然我没有index.android.bundle,那接下来我该怎么办呢?
2021-06-02 12:53:26
惊人的!这对我有帮助。在第 6 步,我不得不将命令替换react-native bundle --platform android --dev false --entry-file index.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res为避免The "path" argument must be of type string. Received type boolean. 然后我跑了./gradlew assembleArRelease --stacktrace
2021-06-04 12:53:26
这终于对我有用了。第 5 项很关键。对我来说唯一的区别是我转到了 android 文件夹并使用以下命令构建了我的 apk:“./gradlew assembleRelease”,如问题所示。
2021-06-13 12:53:26
@davidnathan,删除 index.android.bundle 后,再次生成它,然后删除或完全终端进程并运行Npm Start* 并在此之后运行 android release cmd。
2021-06-15 12:53:26

有同样的错误。我做了什么来解决它:

  1. 删除drawable文件夹android/app/src/main/res中的所有图片
  2. 生成 apk cd android && gradlew assembleRelease
这似乎有点极端。那么你如何在你的应用程序中包含图像?
2021-05-22 12:53:26
谢谢,仅删除 Android 项目中的可绘制对象对我有帮助。"react": "^16.6.0-alpha.8af6728", "react-native": "^0.57.3", "react-native": "^0.57.3", "react-native": "^0.57.3", "react-native": "^0.57.3", "react-native": "^0.57.3".
2021-05-23 12:53:26
不要只删除整个“res”目录,只删除里面的所有“drawable”文件夹。Res 目录还包含 AndroidManifest 所需的“mipmap”文件夹。
2021-06-02 12:53:26
@Bob 图像在您运行命令时被复制到一个包中,因此如果图像已经被复制,再次运行该命令会导致该错误
2021-06-07 12:53:26
我试过了,但又变得一样了。我还在 AndroidManifest 文件中添加了 clearTextTraffice 。请帮忙,我从过去 4 天开始尝试这个。
2021-06-15 12:53:26

如更改日志所示,最新版本的 React Native (>0.57.0) 已将 Gradle 包装器级别提高到 4.4,将 Gradle 插件提高到 3.1.4。这会使 Gradle 构建过程将 AAPT 的结果(现在需要)存储在与以前不同的目录中。所以基本上你必须手动编辑 /node_modules/react-native/react.gradle 文件并在 doFirst 块之后添加 doLast 。

doFirst { ... }
doLast {
    def moveFunc = { resSuffix ->
        File originalDir = file("$buildDir/generated/res/react/release/drawable-${resSuffix}");
        if (originalDir.exists()) {
            File destDir = file("$buildDir/../src/main/res/drawable-${resSuffix}");
            ant.move(file: originalDir, tofile: destDir);
        }
    }
    moveFunc.curry("ldpi").call()
    moveFunc.curry("mdpi").call()
    moveFunc.curry("hdpi").call()
    moveFunc.curry("xhdpi").call()
    moveFunc.curry("xxhdpi").call()
    moveFunc.curry("xxxhdpi").call()
}
首先通过命令创建JS包并在下面的行中注释app-> build.gradle也可以解决此问题。申请自:“../../node_modules/react-native/react.gradle”
2021-05-24 12:53:26
@vickykeshri 必须在上述答案中给出的节点module文件夹路径中静态添加/node_modules/react-native/react.gradle除此之外,我们有更方便的解决方案来删除应用程序:app-> build.gradle 中的“../../node_modules/react-native/react.gradle”行。
2021-05-30 12:53:26
我必须如何以及在我的代码中添加上述代码段的位置。?
2021-06-09 12:53:26

llya 今天我遇到了类似的问题,并通过以下步骤修复:

  • 将 build.gradle 中的类路径 'com.android.tools.build:gradle:3.1.3' 更新为类路径 'com.android.tools.build:gradle:3.2.0'。

  • 将 /android/gradle/ 中的 distributionUrl=https://services.gradle.org/distributions/gradle-4.4-all.zip 更改为 distributionUrl=https://services.gradle.org/distributions/gradle-4.6-all.zip包装器/gradle-wrapper.properties

  • 从 gradle.properties 中删除了 android.enableAapt2=false

  • 更新 buildToolsVersion:27.0.3

  • 清洁工程

  • 在 android studio 中再次同步 gradle。

  • 捆绑并再次尝试进行发布构建。

嗨拉贾特。该死,我以为我取得了进展,但似乎是因为我只是手动删除了重复的图像。如果可以,请看一下我做的一个新问题:stackoverflow.com/questions/52669782/...
2021-06-02 12:53:26
耶。这个帮助我向前推进。现在遇到其他问题,但它的进步。谢谢!!
2021-06-09 12:53:26
我应该在“清洁项目”步骤做什么?
2021-06-13 12:53:26
很棒,乐于助人
2021-06-19 12:53:26

删除所有名称类似于 node_modules_{some_path}_{imagename}.{extension} 或 src_images_{imagename}.{extension} 的文件

来自 android/app/src/main/res 中的所有文件夹,例如

android/app/src/main/res/drawable-xhdpi/node_modules_reactnavigation_src_views_assets_backicon.png android/app/src/main/res/drawable-xhdpi/src_images_mylogo.jpg

可能是由 react-native bundle 放在那里的,它们会导致重复的资源错误

这解决了我的问题!react-native bundle 已经捆绑了我所有的资产,所以是的,我必须在运行 assemble-release 之前删除重复项。
2021-06-01 12:53:26