PS:今天項(xiàng)目轉(zhuǎn)移后編譯成功,然而運(yùn)行后蠢莺,突然一大堆飄紅,看著心慌慌的零如。躏将。。
查了一圈之后考蕾,找到了解決方案:
- 找到android build.gradle文件:
buildscript {
repositories {
// 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' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.0'
}
}
allprojects {
repositories {
// 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' }
}
}
- 找到Flutter SDK目錄 進(jìn)入\packages\flutter_tools\gradle 修改flutter.gradle文件:
buildscript {
repositories {
// 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' }
}
}
之后祸憋,應(yīng)該能正常運(yùn)行了。肖卧。蚯窥。