When I run npx expo run:android
on my windows device it throws this error in like a couple of seconds
npx expo run:android
› Building app...
Configuration on demand is an incubating feature.
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* Where:
Settings file 'C:\Projects\Uniloop\frontend\android\settings.gradle' line: 4
* 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
* 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 .
==============================================================================
2: Task failed with an exception.
-----------
* What went wrong:
Failed to query the value of property 'buildFlowServiceProperty'.
> Could not isolate value .jetbrains.kotlin.gradle.plugin.statistics.BuildFlowService$Parameters_Decorated@23d74da7 of type BuildFlowService.Parameters
> A problem occurred configuring project ':gradle-plugin:react-native-gradle-plugin'.
> java.util.zip.ZipException: zip END header not found
* 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 .
==============================================================================
BUILD FAILED in 4s
Error: C:\Projects\Uniloop\frontend\android\gradlew.bat app:assembleDebug -x lint -x test --configure-on-demand --build-cache -PreactNativeDevServerPort=8081 -PreactNativeArchitectures=arm64-v8a,armeabi-v7a exited with non-zero code: 1
Error: C:\Projects\Uniloop\frontend\android\gradlew.bat app:assembleDebug -x lint -x test --configure-on-demand --build-cache -PreactNativeDevServerPort=8081 -PreactNativeArchitectures=arm64-v8a,armeabi-v7a exited with non-zero code: 1
at ChildProcesspletionListener (C:\Projects\Uniloop\frontend\node_modules\@expo\spawn-async\src\spawnAsync.ts:67:13)
at Object.onceWrapper (node:events:622:26)
at ChildProcess.emit (node:events:507:28)
at ChildProcess.cp.emit (C:\Projects\Uniloop\frontend\node_modules\cross-spawn\lib\enoent.js:34:29)
at maybeClose (node:internal/child_process:1101:16)
at Process.ChildProcess._handle.onexit (node:internal/child_process:305:5)
...
at spawnAsync (C:\Projects\Uniloop\frontend\node_modules\@expo\spawn-async\src\spawnAsync.ts:28:21)
at spawnGradleAsync (C:\Projects\Uniloop\frontend\node_modules\@expo\cli\src\start\platforms\android\gradle.ts:134:28)
at assembleAsync (C:\Projects\Uniloop\frontend\node_modules\@expo\cli\src\start\platforms\android\gradle.ts:83:16)
at runAndroidAsync (C:\Projects\Uniloop\frontend\node_modules\@expo\cli\src\run\android\runAndroidAsync.ts:48:24)
I have tried deleting the .gradle/caches and .gradle/wrapper/dist directories and installing it again, I've also ran expo prebuild --clean
however none of this has seemed to help, I would appreciate if someone could help me, I've looked everywhere online and all the answers just tell me to delete the folders and run it again but it always throws the same errors.
I also want to try to find the java.util.zip.ZipException
so that I can delete it or idk reinstall it
I know that the end header not found means that there's some corrupt file somewhere but no matter what I delete and reinstall it always throws this error, and I've also reinstalled my node modules and I also completely deleted the project and cloned it again, but it still throws this error
When I run npx expo run:android
on my windows device it throws this error in like a couple of seconds
npx expo run:android
› Building app...
Configuration on demand is an incubating feature.
FAILURE: Build completed with 2 failures.
1: Task failed with an exception.
-----------
* Where:
Settings file 'C:\Projects\Uniloop\frontend\android\settings.gradle' line: 4
* 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
* 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..
==============================================================================
2: Task failed with an exception.
-----------
* What went wrong:
Failed to query the value of property 'buildFlowServiceProperty'.
> Could not isolate value .jetbrains.kotlin.gradle.plugin.statistics.BuildFlowService$Parameters_Decorated@23d74da7 of type BuildFlowService.Parameters
> A problem occurred configuring project ':gradle-plugin:react-native-gradle-plugin'.
> java.util.zip.ZipException: zip END header not found
* 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..
==============================================================================
BUILD FAILED in 4s
Error: C:\Projects\Uniloop\frontend\android\gradlew.bat app:assembleDebug -x lint -x test --configure-on-demand --build-cache -PreactNativeDevServerPort=8081 -PreactNativeArchitectures=arm64-v8a,armeabi-v7a exited with non-zero code: 1
Error: C:\Projects\Uniloop\frontend\android\gradlew.bat app:assembleDebug -x lint -x test --configure-on-demand --build-cache -PreactNativeDevServerPort=8081 -PreactNativeArchitectures=arm64-v8a,armeabi-v7a exited with non-zero code: 1
at ChildProcesspletionListener (C:\Projects\Uniloop\frontend\node_modules\@expo\spawn-async\src\spawnAsync.ts:67:13)
at Object.onceWrapper (node:events:622:26)
at ChildProcess.emit (node:events:507:28)
at ChildProcess.cp.emit (C:\Projects\Uniloop\frontend\node_modules\cross-spawn\lib\enoent.js:34:29)
at maybeClose (node:internal/child_process:1101:16)
at Process.ChildProcess._handle.onexit (node:internal/child_process:305:5)
...
at spawnAsync (C:\Projects\Uniloop\frontend\node_modules\@expo\spawn-async\src\spawnAsync.ts:28:21)
at spawnGradleAsync (C:\Projects\Uniloop\frontend\node_modules\@expo\cli\src\start\platforms\android\gradle.ts:134:28)
at assembleAsync (C:\Projects\Uniloop\frontend\node_modules\@expo\cli\src\start\platforms\android\gradle.ts:83:16)
at runAndroidAsync (C:\Projects\Uniloop\frontend\node_modules\@expo\cli\src\run\android\runAndroidAsync.ts:48:24)
I have tried deleting the .gradle/caches and .gradle/wrapper/dist directories and installing it again, I've also ran expo prebuild --clean
however none of this has seemed to help, I would appreciate if someone could help me, I've looked everywhere online and all the answers just tell me to delete the folders and run it again but it always throws the same errors.
I also want to try to find the java.util.zip.ZipException
so that I can delete it or idk reinstall it
I know that the end header not found means that there's some corrupt file somewhere but no matter what I delete and reinstall it always throws this error, and I've also reinstalled my node modules and I also completely deleted the project and cloned it again, but it still throws this error
Share Improve this question edited Feb 2 at 12:07 Henry asked Feb 2 at 12:02 HenryHenry 12 bronze badges1 Answer
Reset to default 0You're right, the error means that a file is corrupt. In this case, it looks like it's the gradle file. I'll recommend deleting .gradle
in C:\Users\[your_username]
, and also changing the version of your grade in gradle-wrapper.properties