flutter 工程编译问题

开源中国首席膨胀怪 发布于 03/07 17:33
阅读 82
收藏 0
buildscript {
    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' }
    }

    dependencies {
        classpath 'com.android.tools.build:gradle:3.1.2'
    }
}

allprojects {
    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' }
    }
}

rootProject.buildDir = '../build'
subprojects {
    project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
    project.evaluationDependsOn(':app')
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

flutter.gradle中也改一样的。还是不能编译,报

Launching lib\main.dart on NEM TL00H in debug mode...
Initializing gradle...
Resolving dependencies...
* Error running Gradle:
ProcessException: Process "D:\Flutter\flutter_demo\android\gradlew.bat" exited abnormally:

> Configure project :app

Project evaluation failed including an error in afterEvaluate {}. Run with --stacktrace for details of the afterEvaluate {} error.

FAILURE: Build failed with an exception.

* Where:
Build file 'D:\Flutter\flutter_demo\android\app\build.gradle' line: 25

* What went wrong:
A problem occurred evaluating project ':app'.
> Could not resolve all dependencies for configuration 'classpath'.
   > You must specify a URL for a Maven repository.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 23s
  Command: D:\Flutter\flutter_demo\android\gradlew.bat app:properties

Finished with error: Please review your Gradle project setup in the android/ folder.
小弟不懂啊,求助。

加载中
返回顶部
顶部