Hi React Native Community,
I’m encountering a build failure in my React Native project, and I’m hoping someone can help me troubleshoot this issue. The project was working fine yesterday, but today, when I tried to clean the project using ./gradlew clean, I ran into the following error:
**FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
- Where:
Settings file '/home/Myprojectupgraded/MobileAppNew/Myproject/android/settings.gradle' line: 2
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.
What went wrong:
Error resolving plugin [id: 'com.facebook.react.settings']
A problem occurred configuring project ':gradle-plugin:react-native-gradle-plugin'.
java.util.zip.ZipException: zip END header not found
2: Task failed with an exception.
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.
What went wrong:
Failed to query the value of property 'buildFlowServiceProperty'.
Could not isolate value org.jetbrains.kotlin.gradle.plugin.statistics.BuildFlowService$Parameters_Decorated@1474b5af of type BuildFlowService.Parameters
A problem occurred configuring project ':gradle-plugin:react-native-gradle-plugin'.
java.util.zip.ZipException: zip END header not found
BUILD FAILED in 472ms**
What I’ve Tried So Far:
Clearing Gradle Cache: I tried deleting the .gradle folder in my home directory and rebuilding the project, but the issue persists.
Reinstalling Dependencies: I ran npm install and ./gradlew clean again, but the error remains.
Checking Network Connection: I ensured that my internet connection is stable, as sometimes network issues can cause problems with downloading dependencies.
Updating Gradle and Plugins: I checked if there were any updates to Gradle or the React Native Gradle plugin, but everything seems up to date.
Environment:
React Native Version: 0.75.3
Gradle Version: 8.8
Operating System: linux
Author Of article : Yash Chavan Read full article