用flutter create flutterdemo1
无法运行android项目,下载超时
修改build.gradle,以下是原本的配置信息
buildscript { ext.kotlin_version = '1.2.71' repositories { google() jcenter() } dependencies { classpath 'com.android.tools.build:gradle:3.2.1' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } allprojects { repositories { google() jcenter() } } rootProject.buildDir = '../build' subprojects { project.buildDir = "${rootProject.buildDir}/${project.name}" } subprojects { project.evaluationDependsOn(':app') } task clean(type: Delete) { delete rootProject.buildDir }
修改成以下的配置信息
buildscript { ext.kotlin_version = '1.2.71' repositories { maven{ url'http://maven.aliyun.com/nexus/content/groups/public/' } maven{ url'http://maven.aliyun.com/nexus/content/repositories/jcenter'} google() jcenter() } dependencies { classpath 'com.android.tools.build:gradle:3.2.1' classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" } } allprojects { repositories { maven{ url'http://maven.aliyun.com/nexus/content/groups/public/' } maven{ url'http://maven.aliyun.com/nexus/content/repositories/jcenter'} google() jcenter() } } rootProject.buildDir = '../build' subprojects { project.buildDir = "${rootProject.buildDir}/${project.name}" } subprojects { project.evaluationDependsOn(':app') } task clean(type: Delete) { delete rootProject.buildDir }