Flutter 运行Flutter run 出现的问题,卡住了

2021-09-23  本文已影响0人  中v中

于是新建了一个flutter项目。运行Flutter项目 执行flutter run命令后卡住了,一直停留在Running Gradle task 'assembleDebug'...
或者提示了 Could not resolve all artifacts for configuration ':classpath'. Could not find com.android.tools.build:gradle:xxx. 这样的问题, 需要在,android项目下找到build.gradle文件。更改为阿里的镜像:

 repositories {
        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' }
        //google()
        //jcenter()
  }
 
 
allprojects {
    repositories {
        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' }
         //google()
        //jcenter()
    }
}
上一篇下一篇

猜你喜欢

热点阅读