Run-time error Android project
Card Initializing gradle ...
Runtime card at Initializing gradle...
this time because the Android project will be used Gradle
, if no FQ, the download speed will be very slow, then we can in the project android/gradle/wrapper/gradle-wrapper.properties
view gradle
the version number and address , we can manually download and unpack it to ~/.gradle/wrapper/dists/
the.
Card Running 'gradle assembleDebug
Runtime card Running 'gradle assembleDebug
, because Gradle Maven repository in a foreign country, you can use Ali cloud mirror address.
* 修改项目中`android/build.gradle`文件
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37
|
{buildscript Repositories { // local changes // 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.2.1 ' } }
allprojects { Repositories { // local changes // 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' } } }
rootProject.buildDir = '../build' subprojects { project.buildDir = "${rootProject.buildDir}/${project.name}" } subprojects { project.evaluationDependsOn(':app') }
task clean(type: Delete) { delete rootProject.buildDir }
|
* 修改Flutter的配置文件, 该文件在`Flutter安装目录/packages/flutter_tools/gradle/flutter.gradle`
1 2 3 4 5 6 7 8 9 10 11 12 13
|
{buildscript Repositories { // local changes // 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.2.1 ' } } |