1

i'm runing Pop_OS! 20.10

flutter doctor -v

[✓] Flutter (Channel stable, 1.22.3, on Linux, locale en_US.UTF-8) • Flutter version 1.22.3 at /home/samdc/DevTools/flutter • Framework revision 8874f21 (3 months ago), 2020-10-29 14:14:35 -0700 • Engine revision a1440ca392 • Dart version 2.10.3 • Pub download mirror https://pub.flutter-io.cn • Flutter download mirror https://storage.flutter-io.cn

[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3) • Android SDK at /home/samdc/DevTools/Android/SDK • Platform android-30, build-tools 30.0.3 • Java binary at: /opt/android-studio/jre/bin/java • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593) • All Android licenses accepted.

[!] Android Studio • Android Studio at /opt/android-studio ✗ Flutter plugin not installed; this adds Flutter specific functionality. ✗ Dart plugin not installed; this adds Dart specific functionality. • android-studio-dir = /opt/android-studio • Java version OpenJDK Runtime Environment (build 1.8.0_242-release-1644-b3-6222593)

[✓] VS Code (version 1.52.1) • VS Code at /usr/share/code • Flutter extension version 3.18.1

[✓] Connected device (1 available) • Google Nexus 5 (mobile) • 192.168.56.101:5555 • android-x86 • Android 5.1 (API 22)

dart --version

Dart SDK version: 2.10.3 (stable) (Tue Oct 27 14:44:30 2020 +0100) on "linux_x64"

java --version

openjdk 14.0.2 2020-07-14 OpenJDK Runtime Environment (build 14.0.2+12-Ubuntu-1) OpenJDK 64-Bit Server VM (build 14.0.2+12-Ubuntu-1, mixed mode, sharing)

gradle -v
Gradle 6.8

Build time: 2021-01-08 16:38:46 UTC
Revision: b7e82460c5373e194fb478a998c4fcfe7da53a7e

Kotlin: 1.4.20
Groovy: 2.5.12
Ant: Apache Ant(TM) version 1.10.9 compiled on September 27 2020
JVM: 14.0.2 (Private Build 14.0.2+12-Ubuntu-1)
OS: Linux 5.8.0-7630-generic amd64

When i try to run flutter app from terminal using flutter run i get this massege

Launching lib/main.dart on Google Nexus 5 in debug mode...
Running Gradle task 'assembleDebug'...

and it will be stuck forever .

and as the emulator i'm using genymotion and i'm using VPN because my country is banned from using google services , and the internet speed is unstable . and also i tried to run the app from VS Code with no luck . i've been trying to install flutter for 2 weeks with no luck , hope find the solution

things i tried : flutter clean I have changed the Gradle wrapper properties distribution URL version to: 6.8-all

Edit : afyer a while of waiting the flutter run command throw this error

Launching lib/main.dart on Google Nexus 5 in debug mode... Running Gradle task 'assembleDebug'...
Exception in thread "main" java.util.zip.ZipException: error in opening zip file Running Gradle task 'assembleDebug'...
at java.util.zip.ZipFile.open(Native Method) Running Gradle task 'assembleDebug'...
at java.util.zip.ZipFile.(ZipFile.java:225) Running Gradle task 'assembleDebug'...
at java.util.zip.ZipFile.(ZipFile.java:155) Running Gradle task 'assembleDebug'...
at java.util.zip.ZipFile.(ZipFile.java:169) Running Gradle task 'assembleDebug'...
at org.gradle.wrapper.Install.unzip(Install.java:214) Running Gradle task 'assembleDebug'...
at org.gradle.wrapper.Install.access$600(Install.java:27) Running Gradle task 'assembleDebug'...
at org.gradle.wrapper.Install$1.call(Install.java:74) Running Gradle task 'assembleDebug'...
at org.gradle.wrapper.Install$1.call(Install.java:48) Running Gradle task 'assembleDebug'...
at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:65) Running Gradle task 'assembleDebug'...
at org.gradle.wrapper.Install.createDist(Install.java:48) Running Gradle task 'assembleDebug'...
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:128) Running Gradle task 'assembleDebug'...
at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61) Running Gradle task 'assembleDebug'...
Running Gradle task 'assembleDebug'... Done
470.0s (!) [!] Gradle threw an error while downloading artifacts from the network. Retrying to download... Exception in thread "main" java.util.zip.ZipException: error in opening zip file at java.util.zip.ZipFile.open(Native Method)
at java.util.zip.ZipFile.(ZipFile.java:225)
at java.util.zip.ZipFile.(ZipFile.java:155)
at java.util.zip.ZipFile.(ZipFile.java:169)
at org.gradle.wrapper.Install.unzip(Install.java:214)
at org.gradle.wrapper.Install.access$600(Install.java:27)
at org.gradle.wrapper.Install$1.call(Install.java:74)
at org.gradle.wrapper.Install$1.call(Install.java:48)
at org.gradle.wrapper.ExclusiveFileAccessManager.access(ExclusiveFileAccessManager.java:65) at org.gradle.wrapper.Install.createDist(Install.java:48)
at org.gradle.wrapper.WrapperExecutor.execute(WrapperExecutor.java:128) at org.gradle.wrapper.GradleWrapperMain.main(GradleWrapperMain.java:61) Running Gradle task 'assembleDebug'...
Running Gradle task 'assembleDebug'... Done
0.2s [!] Gradle threw an error while downloading artifacts from the network. Retrying to download... Exception: Gradle task assembleDebug failed with exit code 1

SamDc73
  • 11
  • 3
  • Is terminal showing any type of error or it's just assemble Debug. – Amit Kumar Jan 16 '21 at 20:06
  • No , it is not showing any type of error . – SamDc73 Jan 16 '21 at 20:19
  • Normally for first time it can take 15-20 minutes nearly to process , just leave it running as much as time it is taking because if there would be any problem it show's error , assemble debug is process in which you app builds so, till it is not completed you cannot say surely there is error or not so let it complete, if it shows error after assemble debug let me know – Amit Kumar Jan 16 '21 at 21:08
  • @AmitKumar after a while it show an error . – SamDc73 Jan 17 '21 at 07:50
  • Can you tell me the details of error – Amit Kumar Jan 17 '21 at 09:08
  • my bad, i edited the post and add the error – SamDc73 Jan 17 '21 at 09:18
  • Looks very similar to this other question, take a look: [exception in thread "main" java.util.zip.ZipException](https://stackoverflow.com/questions/67901965/flutter-gradle-task-assembledebug-failed-with-exit-code-1-zip-end-header-not-fou) – Jesus Hernandez Barrios Aug 11 '21 at 03:21

1 Answers1

0

I have dealt with this exact issue in the past, what worked for me was I uninstalled flutter sdk, android studio and all the elements I installed related to flutter and repeated the process of installing flutter and all of the components it requires. If this does not work, I suggest not using the emulator but using a physical device to run your code.

Sharav
  • 1
  • 1