Reason: It
will be stuck in Running'gradle assembleDebug when running, because Gradle's Maven warehouse is abroad, you can use the mirror address of Alibaba Cloud.
Solution
- Modify the android/build.gradle file in the project
//google()
//jcenter()
改成
maven { url 'https://maven.aliyun.com/repository/google' }
maven { url 'https://maven.aliyun.com/repository/jcenter' }
maven { url 'http://maven.aliyun.com/nexus/content/groups/public' }
- Modify the Flutter configuration file, which is in the Flutter installation directory/packages/flutter_tools/gradle/flutter.gradle
//google()
//jcenter()
改成
maven { url 'https://maven.aliyun.com/repository/google' }
maven { url 'https://maven.aliyun.com/repository/jcenter' }
maven { url 'http://maven.aliyun.com/nexus/content/groups/public' }