I'm trying to run the demo flutter app through android studio but but whenever I hit run, it says "initializing gradle" on the terminal and never runs the application. I ran the flutter doctor command and it says that there are zero issues so I'm not sure what to do.

The issue


Solution 1: 荣文潭

Firstly, make sure your Gradle version is above gradle-4.6-all Then, change this property:

distributionUrl=https://services.gradle.org/distributions/gradle-4.6-all.zip

It works!


Solution 2: Isuru Uthpala

In gradle-wrapper.properties file make sure distributionUrl is set to your installed gradle version. check your .gradle\wrapper\dists location for your version. make sure you have 4.6 or above.


Solution 3: 胡文涛

you need open projectPath/android/gradle/wrapper/gradle-wrapper.properties, find distributionUrl, download gradle file from distributionUrl, move gradle file(don't unzip file) to C:\Users.gradle\wrapper\dists\