I want to generate the unsigned app-release.apk without the react-packager server. I am running the following commands for that.
cd react-native-project-dir
react-native bundle --platform android --dev false --entry-file index.android.js --bundle-output android/app/src/main/assets/index.android.bundle --assets-dest android/app/src/main/res/
After the following command I get the error in command prompt like these:
cd android && gradlew assemblerelease
app:processReleaseManifestessReleaseManifest
:app:processReleaseResources D:\ReactNativeProject\android\app\build\intermediates\res\merged\release\drawable-mdpi-v4\image_background_unique_2.jpg: error: Duplicate file. D:\ReactNativeProject\android\app\build\intermediates\res\merged\release\drawable-mdpi\image_background_unique_2.jpg: Original is here. The version qualifier may be implied. :app:processReleaseResources FAILED
FAILURE: Build failed with an exception.
- What went wrong: Execution failed for task ':app:processReleaseResources'. com.android.ide.common.process.ProcessException: Failed to execute aapt
And I am not able to generate the app-release.apk and not understanding why the image_background_unique_2.jpg file is getting added two times in different folders.