android gradle 卡死

android studio 卡 Initializing gradle

sdk 中 查找文件:

‘flutter\packages\flutter_tools\gradle\flutter.gradle’
修改配置:

1
2
3
4
5
6
7
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(){ url 'http://jcenter.bintray.com/'}
}

gradle 卡死

项目中打开文件查找版本:

vim hello_world\android\gradle\wrapper\gradle-wrapper

1
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip

下载地址:

1
https://gradle.org/releases/

zip 包放到用户主目录 .gradle\wrapper\dists\gradle-4.10.2-all\9fahxiiecdb76a5g3aw9oi8rv\

google_m2repository_gms_v11_3_rc05_wear_2_0_5.zip

google_m2repository_gms_v11_3_rc05_wear_2_0_5.zip 解压缩到 sdkpath/extras/google/m2repository