React Native打包android apk安装包报错: Original is here. The version qualifier may be implied.

React Native项目,用命令打包Android APK安装包,执行命令gradlew assembleRelease后,总是报如下错误:

/Users/xxx/Desktop/base/v0.36/android/app/build/intermediates/res/merged/release/drawable-mdpi-v4/src_test_module_res_bg_1.jpg: error: Duplicate file.
/Users/xxx/Desktop/base/v0.36/android/app/build/intermediates/res/merged/release/drawable-mdpi/src_test_module_res_bg_1.jpg: Original is here. The version qualifier may be implied.

解决办法:

用Android Studio打开android目录,找到res/drawable目录,把里面的图片文件都删掉(因为这些图片都是React Native自动生成的,所以删除即可)。再次重新执行gradlew assembleRelease命令就不会报错了。

你可能感兴趣的:(React Native打包android apk安装包报错: Original is here. The version qualifier may be implied.)