Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

zip end header not found #21130

Closed
Krishna-Vamsi-Chintalapati opened this issue Sep 15, 2018 · 4 comments
Closed

zip end header not found #21130

Krishna-Vamsi-Chintalapati opened this issue Sep 15, 2018 · 4 comments
Labels
Platform: Android Android applications. Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.

Comments

@Krishna-Vamsi-Chintalapati
Copy link

Krishna-Vamsi-Chintalapati commented Sep 15, 2018

Environment

React Native Environment Info:
System:
OS: Windows 10
CPU: x64 Intel(R) Core(TM) i5-6200U CPU @ 2.30GHz
Memory: 1.08 GB / 3.89 GB
Binaries:
npm: 6.2.0 - C:\Program Files\nodejs\npm.CMD
IDEs:
Android Studio: Version 3.1.0.0 AI-173.4907809

Description

when executing the react-native run-android, the following error occurs:
Scanning folders for symlinks in /Users/Vamsi/AppData/Roaming/npm/node_modules (17ms)
JS server already running.
Building and installing the app on the device (cd android && ./gradlew installDebug)...
Unzipping /Users/Vamsi/.gradle/wrapper/dists/gradle-2.14.1-all/8bnwg5hd3w55iofp58khbp6yv/gradle-2.14.1-all.zip to /Users/Vamsi/.gradle/wrapper/dists/gradle-2.14.1-all/8bnwg5hd3w55iofp58khbp6yv
Exception in thread "main" java.util.zip.ZipException: zip END header not found
at java.base/java.util.zip.ZipFile$Source.zerror(ZipFile.java:1252)
at java.base/java.util.zip.ZipFile$Source.findEND(ZipFile.java:1153)
at java.base/java.util.zip.ZipFile$Source.initCEN(ZipFile.java:1160)
at java.base/java.util.zip.ZipFile$Source.(ZipFile.java:997)
at java.base/java.util.zip.ZipFile$Source.get(ZipFile.java:960)
at java.base/java.util.zip.ZipFile.(ZipFile.java:216)
at java.base/java.util.zip.ZipFile.(ZipFile.java:148)
at java.base/java.util.zip.ZipFile.(ZipFile.java:162)
at org.gradle.wrapper.Install.unzip(Install.java:159)
at org.gradle.wrapper.Install.access$500(Install.java:26)
at org.gradle.wrapper.Install$1.call(Install.java:69)
at org.gradle.wrapper.Install$1.call(Install.java:46)
at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:65)
at org.gradle.wrapper.Install.createDist(Install.java:46)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:126)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61)
Could not install the app on the device, read the error above for details.
Make sure you have an Android emulator running or a device connected and have
set up your Android development environment:
https://facebook.github.io/react-native/docs/android-setup.html

Reproducible Demo

react-native run android

@ZuhayrMerchant
Copy link

having the same issue can anyone help me out with this issue?

@react-native-bot
Copy link
Collaborator

I am closing this issue because it does not appear to have been verified on the latest release, and there has been no followup in a while.

If you found this thread after encountering the same issue in the latest release, please feel free to create a new issue with up-to-date information by clicking here.

@react-native-bot react-native-bot added the Ran Commands One of our bots successfully processed a command. label Jan 1, 2019
@hknguyenvu
Copy link

Solution:
Go to /Users/{USER_NAME}/.gradle, delete all folders and files in this folder and run again

@MuhammadBilalQamar
Copy link

Could not unzip C:\Users\home.gradle\wrapper\dists\gradle-5.4.1-all\3221gyojl5jsh0helicew7rwx\gradle-5.4.1-all.zip to C:\Users\home.gradle\wrapper\dists\gradle-5.4.1-all\3221gyojl5jsh0helicew7rwx.
Reason: zip END header not found
Exception in thread "main" java.util.zip.ZipException: zip END header not found
at java.base/java.util.zip.ZipFile$Source.zerror(ZipFile.java:1470)
at java.base/java.util.zip.ZipFile$Source.findEND(ZipFile.java:1371)
at java.base/java.util.zip.ZipFile$Source.initCEN(ZipFile.java:1378)
at java.base/java.util.zip.ZipFile$Source.(ZipFile.java:1209)
at java.base/java.util.zip.ZipFile$Source.get(ZipFile.java:1172)
at java.base/java.util.zip.ZipFile$CleanableResource.(ZipFile.java:719)
at java.base/java.util.zip.ZipFile.(ZipFile.java:239)
at java.base/java.util.zip.ZipFile.(ZipFile.java:169)
at java.base/java.util.zip.ZipFile.(ZipFile.java:183)
at org.gradle.wrapper.Install.unzip(Install.java:219)
at org.gradle.wrapper.Install.access$600(Install.java:27)
at org.gradle.wrapper.Install$1.call(Install.java:75)
at org.gradle.wrapper.Install$1.call(Install.java:48)
at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:69)
at org.gradle.wrapper.Install.createDist(Install.java:48)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:107)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:63)

error Failed to install the app. Make sure you have the Android development environment set up: https://facebook.github.io/react-native/docs/getting-started.html#android-development-environment. Run CLI with --verbose flag for more details.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
Exception in thread "main" java.util.zip.ZipException: zip END header not found
at java.base/java.util.zip.ZipFile$Source.zerror(ZipFile.java:1470)
at java.base/java.util.zip.ZipFile$Source.findEND(ZipFile.java:1371)
at java.base/java.util.zip.ZipFile$Source.initCEN(ZipFile.java:1378)
at java.base/java.util.zip.ZipFile$Source.(ZipFile.java:1209)
at java.base/java.util.zip.ZipFile$Source.get(ZipFile.java:1172)
at java.base/java.util.zip.ZipFile$CleanableResource.(ZipFile.java:719)
at java.base/java.util.zip.ZipFile.(ZipFile.java:239)
at java.base/java.util.zip.ZipFile.(ZipFile.java:169)
at java.base/java.util.zip.ZipFile.(ZipFile.java:183)
at org.gradle.wrapper.Install.unzip(Install.java:219)
at org.gradle.wrapper.Install.access$600(Install.java:27)
at org.gradle.wrapper.Install$1.call(Install.java:75)
at org.gradle.wrapper.Install$1.call(Install.java:48)
at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:69)
at org.gradle.wrapper.Install.createDist(Install.java:48)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:107)
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:63)

@facebook facebook locked as resolved and limited conversation to collaborators Jan 1, 2020
@react-native-bot react-native-bot added the Resolution: Locked This issue was locked by the bot. label Jan 1, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Platform: Android Android applications. Ran Commands One of our bots successfully processed a command. Resolution: Locked This issue was locked by the bot.
Projects
None yet
Development

No branches or pull requests

6 participants