Flutter环境安装,遇到的坑按照Flutter步骤安装,新建了⼀个DEMO,Debug ⽆法通过,抛出类似如下的错误信息,
* Where: Build file '.../android/adle' line: 25
原因是jcenter google库⽆法访问,被强了,即使有VPN等等,也⽆法访问
解决⽅法1:修改adle,注释掉jcenter(),google()。使⽤阿⾥的镜像。
buildscript {
repositories {
//google()
//jcenter()
maven { url 'maven.aliyun/repository/google' }
maven { url 'maven.aliyun/repository/jcenter' }
maven { url 'maven.aliyun/nexus/content/groups/public' }
}
}
allprojects {
repositories {
//google()
//jcenter()
maven { url 'maven.aliyun/repository/google' }
maven { url 'maven.aliyun/repository/jcenter' }
maven { url 'maven.aliyun/nexus/content/groups/public' }
}
}
第⼆步:到fluttersdk⽬录进⼊如下⽬录
Flutter -> packages -> flutter_tools -> gradle
到 adle ⽂件 , 把jcenter注释掉,替换阿⾥的镜像
b uildscript {flutter sdk
repositories {
//jcenter()
//maven {
// url 'dl.google/dl/android/maven2'
//}
maven{
url 'maven.aliyun/repository/jcenter'
}
maven{
url 'maven.aliyun/nexus/content/groups/public'
}
}
}
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系QQ:729038198,我们将在24小时内删除。
发表评论