Error when i run ionic build android

Hi ionic developer !
please i have this problem when i run ionic build android i need help please

Running command: /Users/username/projet/projet/hooks/after_prepare/010_add_platform_class.js /Users/username/projet/projet
add to body class: platform-android
Unzipping /Users/username/.gradle/wrapper/dists/gradle-2.2.1-all/2m8005s69iu8v0oiejfej094b/ to /Users/username/.gradle/wrapper/dists/gradle-2.2.1-all/2m8005s69iu8v0oiejfej094b
Exception in thread “main” java.lang.RuntimeException: error in opening zip file
at org.gradle.wrapper.ExclusiveFileAccessManager.access(
at org.gradle.wrapper.Install.createDist(
at org.gradle.wrapper.WrapperExecutor.execute(
at org.gradle.wrapper.GradleWrapperMain.main(
Caused by: error in opening zip file
at Method)
at org.gradle.wrapper.Install.unzip(
at org.gradle.wrapper.Install.access$400(
at org.gradle.wrapper.Install$
at org.gradle.wrapper.Install$
at org.gradle.wrapper.ExclusiveFileAccessManager.access(
… 3 more
Error: Error code 1 for command: /Users/username/projet/projet/platforms/android/gradlew with args: cdvBuildDebug,-b,/Users/username/projet/projet/platforms/android/build.gradle,-Dorg.gradle.daemon=true,-Pandroid.useDeprecatedNdk=true


This is not about Ionic. This error occurs when Unzipping Gradle.


thank you douglasjunior but my android studio work with very good

Yes, but when you run ionic build android, it downloads and runs an standalone Gradle to compile and build your project. And the version of Gradle used by Ionic is different from Android Studio.

If you uses Proxy, VPN, or other authentications types, the Android Studio make it transparent, but when you use Gradle directly is not.

Other option is to delete the Gradle files in /Users/username/.gradle/wrapper/dists/ to force it to do Download again.

ok, thank you for your help