我的Flutter应用程序显示错误时,我试图在安卓手机或模拟器运行



这是错误

当我试图在模拟器中启动时,每个颤振项目都会显示这种错误,但它会在chrome中运行。我试图改变不同的依赖关系,但不工作,它只显示这个错误一次又一次

Launching libmain.dart on RMX3511 in debug mode...
[Fatal Error] guava-28.1-jre.pom:2:1: Content is not allowed in prolog.
[Fatal Error] gson-2.8.5.pom:2:1: Content is not allowed in prolog.     
[Fatal Error] jsr305-1.3.9.pom:2:1: Content is not allowed in prolog.   
FAILURE: Build failed with an exception.
* Where:
Build file 'E:flutterflutterfinal projectdownworkandroidappbuild.gradle' line: 26
* What went wrong:
A problem occurred evaluating project ':app'.
> Could not resolve all files for configuration 'classpath'.
> Could not resolve com.google.guava:guava:28.1-jre.

这是我的构建。级文件

buildscript {
ext.kotlin_version = '1.6.10'
repositories {
google()
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:7.1.2'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
allprojects {
repositories {
google()
mavenCentral()
}
}
rootProject.buildDir = '../build'
subprojects {
project.buildDir = "${rootProject.buildDir}/${project.name}"
}
subprojects {
project.evaluationDependsOn(':app')
}
task clean(type: Delete) {
delete rootProject.buildDir
}

Try replace all:

repositories {
google()
mavenCentral()
}

:

repositories {
mavenCentral()
google()
}

相关内容

最新更新