Flutter错误失败:构建失败,出现异常

时间:2020-05-27 07:34:04

标签: flutter dart

  FAILURE: Build failed with an exception.

* Where:
Build file 'F:\Flutter New Application (Game Conduct)\gamershub\android\app\build.gradle' line: 24

* What went wrong:
A problem occurred evaluating project ':app'.
> ASCII
* 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 21s
Running Gradle task 'assembleDebug'...
Running Gradle task 'assembleDebug'... Done                        23.6s
Exception: Gradle task assembleDebug failed with exit code 1

我的build.gradle文件

buildscript {
ext.kotlin_version = '1.3.50'
repositories {
    jcenter()
    google()
}

dependencies {
    classpath 'com.google.gms:google-services:4.3.3'
    classpath 'com.android.tools.build:gradle:3.2.1'
    classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
  }
}

allprojects {
repositories {
    google()
    jcenter()
 }
}

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

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

在运行flutter apk事件时出现错误,在命令flutter doctor -v中没有问题。但是,当我尝试运行我的代码时,我很容易出错。即使在我使用flutter create创建了新项目之后,我在该项目中也遇到了相同的错误。

0 个答案:

没有答案