Shahbaz Ali
Shahbaz Ali

Reputation: 701

flutter get stuck at resolving dependencies for android

I am using Android Studio for flutter

My flutter doctor says no issue found, when I run iOS app, it works but when app is requested to run as Android app, android studio just hangs up on Resolving dependencies.. what issue can be there? is it downloading something or any other issue?

Upvotes: 29

Views: 25524

Answers (10)

JustYousefSameh
JustYousefSameh

Reputation: 71

I fixed it by making a new flutter project and adding a random dependency. When I went back to the old project it worked fine.

Upvotes: -2

ahmed taha
ahmed taha

Reputation: 7

./flutter_project_name/android/gradlew

After successful build. Try run the project again.

Upvotes: 1

binarynerd
binarynerd

Reputation: 11

It's downloading your dependencies for the first time. it'll take time if you're doing for the first time. just let it complete now ,from next time it'll not take this much time.

Upvotes: 0

Seddiq Sorush
Seddiq Sorush

Reputation: 3132

Open the project root directory in the terminal and run

flutter clean 

and then run the project

Upvotes: 2

EngineerDanny
EngineerDanny

Reputation: 865

Yes. It needs to download all important android dependencies for your app to run. If you are stuck there then kindly check your internet connection and wait for a while. Mine below, took almost 20mins before all dependencies were resolved. Android dependencies

Upvotes: 0

Naveen Kumar
Naveen Kumar

Reputation: 11

Update your flutter plug-in

  • Settings
  • Package and plugins
  • Update or installed -> update
  • Restart ide

Upvotes: 0

Balocodes
Balocodes

Reputation: 687

The simple answer to your question is "yes, it is downloading some dependencies". It may take a while depending on your internet connection. I know this was asked a while ago but I encountered the same problem recently. P.S. Don't forget to accept android licenses if you haven't already done so.

Upvotes: 1

Dileep XDN
Dileep XDN

Reputation: 157

Note : install java and add jdk../bin to environment variables

1.go to this folder ::  "your_project_folder/android/"
2. delete ".gradle"
3. open cmd in that directory 
4. type "gradlew" in cmd

after this run app normally : " flutter run "

Upvotes: 0

Ivan Kaloyanov
Ivan Kaloyanov

Reputation: 1748

If that's the first Flutter app that you are running I suggest you to give it some time. I am using i5 QC 3.2GHz / 16ram machine and it took me about 10 minutes the first time. At first it get stuck at:

Initializing gradle...

and then again at

Resolving dependencies...

after the first launch, it's running reasonably fast.

Upvotes: 14

B45i
B45i

Reputation: 2601

Open project root directory in terminal and enter command:

android/gradlew

This will install dependencies related with gradle build system.

Upvotes: 10

Related Questions