Execution failed for task ':app:mergeReleaseResources
See original GitHub issuei am getting error when making release build for my app. error is -> `Task :app:processReleaseGoogleServices Parsing json file: /home/raju/Desktop/Work/Completed/abms/Upgraded/akhil_bhartiya_mali_samaj_sangh_social_app/android/app/google-services.json
Task :app:mergeReleaseResources FAILED
FAILURE: Build failed with an exception.
- What went wrong: Execution failed for task ‘:app:mergeReleaseResources’.
1 exception was raised by workers: com.android.builder.internal.aapt.v2.Aapt2Exception: Android resource compilation failed /home/raju/Desktop/Work/Completed/abms/Upgraded/akhil_bhartiya_mali_samaj_sangh_social_app/android/app/build/generated/res/react/release/drawable-mdpi/src_res_logo.png: error: failed to read PNG signature: file does not start with PNG signature. /home/raju/Desktop/Work/Completed/abms/Upgraded/akhil_bhartiya_mali_samaj_sangh_social_app/android/app/build/generated/res/react/release/drawable-mdpi/src_res_logo.png: error: file failed to compile.
-
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
-
Get more help at https://help.gradle.org
BUILD FAILED in 3m 4s 47 actionable tasks: 47 executed ` React Native version: “dependencies”: { “@react-native-community/async-storage”: “^1.7.1”, “@react-native-community/masked-view”: “^0.1.6”, “@react-native-community/netinfo”: “^5.3.3”, “axios”: “^0.19.1”, “moment”: “^2.24.0”, “react”: “^16.9.0”, “react-native”: “^0.61.5”, “react-native-firebase”: “^5.6.0”, “react-native-gesture-handler”: “^1.5.3”, “react-native-image-crop-picker”: “^0.26.2”, “react-native-picker-select”: “^6.3.3”, “react-native-reanimated”: “^1.7.0”, “react-native-safe-area-context”: “^0.6.2”, “react-native-spinkit”: “^1.5.0”, “react-native-vector-icons”: “^6.6.0”, “react-navigation”: “^4.0.10”, “react-navigation-drawer”: “^2.3.3”, “react-navigation-stack”: “^2.0.15”, “react-redux”: “^7.1.3”, “redux”: “^4.0.5”, “redux-form”: “^8.2.6”, “redux-logger”: “^3.0.6”, “redux-thunk”: “^2.3.0” },
Steps To Reproduce
- project directory/cd android
2…/gradlew bundleRelease
react-native run-android working fine, means dev apk is working on device but, release apk is not build and failed with above statemets.
How i can solve this issue ?
Issue Analytics
- State:
- Created 4 years ago
- Reactions:4
- Comments:8
Top GitHub Comments
@rajupushpad please, what’s the paths that I have to check and delete?
Hi @AmrAlmagic, I had found the solution of this issue.
There may be some images in your source file which is not readable. so just delete it and re build your project.
Thanks