dhruv sangwan
dhruv sangwan

Reputation: 23

First Flutter App stuck at “Running Gradle task 'assembleDebug'… ” in Llnux Mint

I'm getting the following error while running my first flutter app in the terminal

Launching lib/main.dart on vivo 1802 in debug mode...
Running Gradle task 'assembleDebug'...                                  
(This is taking an unexpectedly long time.)

I already tried downloading the gradle distribution separately and copy pasting it in my project's gradle wrapper and restarting android studio but it still doesn't resolve the issue.
I'm using Linux Mint 19.

Upvotes: 0

Views: 143

Answers (2)

pragmateek
pragmateek

Reputation: 936

Before starting this building process, make sure:

  1. USB debugging is enabled on your phone,
  2. No app is currently running (and you are on your home screen),

While running your app for the first time on a phone, your phone will get a pop-up asking you to allow the installation of apps via USB.

Click 'allow' on it.

Not clicking 'allow' or simply ignoring it will make it seem like the build process is never-ending.

Upvotes: 0

Addo Seth
Addo Seth

Reputation: 21

  1. Make sure you have an internet connection.When running an app for the first time, gradle needs to download some additional content

  2. Check your connection to your virtual phone or your phone well. Make sure it doesn't disconnect while you are running the app

Upvotes: 2

Related Questions