問(wèn)題1
在安卓模擬器上運(yùn)行時(shí)嗓奢,報(bào)錯(cuò)提示
Finished with error: ProcessException: Process "/Users/xxx/AndroidStudioProjects/app名稱(chēng)/android/gradlew" exited abnormally:
Downloading https://services.gradle.org/distributions/gradle-4.10.2-all.zip
解決
1狈究、在項(xiàng)目目錄gradle — build.gradle — 兩處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' }
2浮庐、打開(kāi)flutter sdk安裝目錄下的/Users/你的mac用戶(hù)名/flutter/packages/flutter_tools/gradle/flutter.gradle文件唁奢,與上面同樣操作霎挟,把google()和jcenter()注釋?zhuān)由仙厦娴溺R像地址。
3麻掸、如果上面步驟都沒(méi)解決問(wèn)題酥夭,打開(kāi)~/.gradle目錄下的gradle.properties文件,把代理設(shè)置全部注釋脊奋。
參考
https://segmentfault.com/q/1010000016775662
https://blog.csdn.net/qq_36032597/article/details/89322370