question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`Running 'gradle assembleDebug'` forever...

See original GitHub issue

Steps to Reproduce

  1. Create a new Flutter project
  2. Start the Android emulator.
  3. Click the ‘Run’ button.

The console says Launching lib\main.dart on Android SDK built for x86 64 in debug mode...

The background tasks thing says Running 'gradle assembleDebug'..., and then it just spins forever, never getting anywhere. There doesn’t seem to be any way to see the gradle output either so I have no idea why it isn’t working.

After about 5-10 mins exactly 5 mins (you should definitely reduce that timeout to something saner) the console says:

Observatory connection never became ready.
Application finished.

Version info

[√] Flutter (on Microsoft Windows [Version 10.0.15063], channel alpha)
    • Flutter at C:\Users\Tim\Flutter\flutter
    • Framework revision dc4ca8db83 (3 days ago), 2017-05-11 15:33:29 -0700
    • Engine revision f99d3ef108
    • Tools Dart version 1.23.0-dev.11.11

[√] Android toolchain - develop for Android devices (Android SDK 25.0.3)
    • Android SDK at C:\Users\Tim\AppData\Local\Android\sdk
    • Platform android-25, build-tools 25.0.3
    • Java binary at: C:\Program Files\Android\Android Studio\jre\bin\java
    • Java version: OpenJDK Runtime Environment (build 1.8.0_112-release-b06)

[√] Android Studio (version 2.3)
    • Android Studio at C:\Program Files\Android\Android Studio
    • Gradle version 3.2
    • Java version: OpenJDK Runtime Environment (build 1.8.0_112-release-b06)

[√] IntelliJ IDEA Community Edition (version 2017.1)
    • Dart plugin version 171.4424
    • Flutter plugin version 13.1

[√] Connected devices
    • Android SDK built for x86 64 • emulator-5554 • android-x64 • Android 7.1.1 (API 25) (emulator)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:30 (7 by maintainers)

github_iconTop GitHub Comments

2reactions
tvolkertcommented, May 16, 2017
1reaction
WesleyBatistacommented, Feb 23, 2020

After a bit of research I was suspecting that the slow internet link was the cause, and I kind of verified this by checking the network activity of my computer after running the flutter run -v and it was consuming all bandwidth (max download speed here was 224KB/s).

I was a bit more patient and I started getting this error:

[+534089 ms] FAILURE: Build failed with an exception.
[   +1 ms] * What went wrong:
[        ] A problem occurred configuring root project 'android'.
[        ] > Could not resolve all artifacts for configuration ':classpath'.
[        ]    > Could not download kotlin-compiler-embeddable.jar (org.jetbrains.kotlin:kotlin-compiler-embeddable:1.3.50)
[        ]       > Could not get resource 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-compiler-embeddable/1.3.50/kotlin-compiler-embeddable-1.3.50.jar'.
[        ]          > Read timed out

It tries to download resources configuring the project, so it might happen just for the first time.

A bit sad but that’s it, hope this help someone else. cheers!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Flutter App stuck at "Running Gradle task 'assembleDebug'... "
If Running Gradle task assembledebug is taking unexpectedly long time, try updating Gradle in your project. (Downloading latest zip file).
Read more >
Stuck at Running Gradle task 'assembleDebug ... - GitHub
dart on Google Nexus 5 in debug mode... > Running Gradle task 'assembleDebug'... and it will be stuck forever . ... and i'm...
Read more >
Learn to solve a Running Gradle Task assembleDebug in Flutter
How to Solve Running Gradle task assembleDebug In Flutter? · Go to: · Hit the button · Add your new firewall exceptions: ·...
Read more >
flutter running gradle task 'assembledebug' slow - Code Grepper
flutter running gradle task 'assembledebug' long time · 1.Go to file You_project_name/android/app/build. · 2.Find defaultConfig · 3.Change minSdkVersion to 26 and ...
Read more >
How to increase your Gradle Build Speed? - DigitalOcean
Make sure you're using the latest version of Gradle. Generally with every new update there is a significant improvement in performance. Note: ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found