java.util.zip.ZipException: error in opening zip file during build


#1

I am having this error
processing node_modules failed command error: gradlew.bat failed with exit code1
while running the app.

here is screen shot

could anyone help?


#2

That’s a very generic error.

Please share more information about your current setup, your application, the command executed. Share some code if it’s more than just the hello-world app.


#3

It is just hello-world app app and here is the screen shot of my command prompt.


#4

Well, it would appear that the downloaded gradle wrapper package is corrupted. Please follow the steps in the github comment where I explain how to invalidate the gradle cache and force a redownload - https://github.com/NativeScript/android-runtime/issues/553#issuecomment-295862685

Navigate to your %USER_HOME%.gradle/ and delete the wrapper/dists/gradle-3.3-bin directory


#5

Thanks Pete.K for your reply, it worked.


#6

Please mark the post with the solution for others who might stumble upon the same error.


#7

Hi Shan,

I notice you have a space in at least one of your paths (the one with your name).
While this may work just fine, I’ve noticed that sometimes this can lead to errors.
I’ve since made sure that my paths don’t have spaces when working with NativeScript.

Just in case you run into other errors later :wink:


#8

got it. Thanks for your reply!