1.修改 andriod 下的build.gradle
repositories { // google() // mavenCentral() maven { url 'https://maven.aliyun.com/repository/google' } maven { url 'https://maven.aliyun.com/repository/jcenter' } maven { url 'https://maven.aliyun.com/nexus/content/groups/public' } } allprojects { repositories { // google() // mavenCentral() maven { url 'https://maven.aliyun.com/repository/google' } maven { url 'https://maven.aliyun.com/repository/jcenter' } maven { url 'https://maven.aliyun.com/nexus/content/groups/public' } } }
2.修改flutter配置文件 修改尾步骤1的地址
Flutter安装目录/packages/flutter_tools/gradle/flutter.gradle
packages\flutter_tools\gradle\resolve_dependencies.gradle
3.出现其他问题时
进入到android目录,执行以下命令即可看到具体错误信息
.\gradlew assembleDebug --stacktrace
本文为看恩吧原创文章,转载无需和我联系,但请注明来自knsay.com