【问题标题】:Can't run my flutter project with a android emulator无法使用 android 模拟器运行我的颤振项目
【发布时间】:2023-03-29 03:02:01
【问题描述】:

当我启动我的模拟器时,它运行良好,使用 google chrome 我的项目运行良好。但问题是当我运行我的项目时出现模拟器问题。

Running "flutter pub get" in Project_1...
Launching lib\main .dart on Android SDK built for x86 in debug mode...
lib\main.dart:1
[Fatal Error] oss-parent-7.pom:2:1: Content is not allowed in prolog.
[Fatal Error] oss-parent-7.pom:2:1: Content is not allowed in prolog.
[Fatal Error] oss-parent-7.pom:2:1: Content is not allowed in prolog.
9
[Fatal Error] oss-parent-7.pom:2:1: Content is not allowed in prolog.
[Fatal Error] jimfs-1.1.pom:2:1: Content is not allowed in prolog.
[Fatal Error] javax.activation-1.2.0.pom:2:1: Content is not allowed in prolog.

FAILURE: Build failed with an exception.

* What went wrong:

A problem occurred configuring root project 'android'.
> Could not resolve all artifacts for configuration ':classpath'.
   > Could not resolve org.tensorflow:tensorflow-lite-metadata:0.1.0-rc2.
     Required by:
         project : > com.android.tools.build:gradle:4.2.0
      > Could not resolve org.tensorflow:tensorflow-lite-metadata:0.1.0-rc2.
         > Could not parse POM https://repo.maven.apache.org/maven2/org/tensorflow/tensorflow-lite-metadata/0.1.0-rc2/tensorflow-lite-metadata-0.1.0-rc2.pom
            > Could not resolve org.sonatype.oss:oss-parent:7.
               > Could not resolve org.sonatype.oss:oss-parent:7.
                  > Could not parse POM https://repo.maven.apache.org/maven2/org/sonatype/oss/oss-parent/7/oss-parent-7.pom
                     > Content is not allowed in prolog.
   > Could not resolve net.sf.jopt-simple:jopt-simple:4.9.
     Required by:
         project : > com.android.tools.build:gradle:4.2.0
         project : > com.android.tools.build:gradle:4.2.0 > com.android.tools.build:builder:4.2.0
      > Could not resolve net.sf.jopt-simple:jopt-simple:4.9.
         > Could not parse POM https://repo.maven.apache.org/maven2/net/sf/jopt-simple/jopt-simple/4.9/jopt-simple-4.9.pom
            > Could not resolve org.sonatype.oss:oss-parent:7.
               > Could not resolve org.sonatype.oss:oss-parent:7.
                  > Could not parse POM https://repo.maven.apache.org/maven2/org/sonatype/oss/oss-parent/7/oss-parent-7.pom
                     > Content is not allowed in prolog.
   

* 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 14s
Exception: Gradle task assembleDebug failed with exit code 1
Exited (sigterm)

似乎我的 gradle 有问题,我无法自己解决。 提前谢谢你。

【问题讨论】:

    标签: flutter gradle android-emulator


    【解决方案1】:

    您是否尝试过使用:

    flutter clean

    【讨论】:

      猜你喜欢
      • 2021-12-16
      • 2022-01-01
      • 1970-01-01
      • 2020-03-12
      • 2021-04-08
      • 2020-03-22
      • 1970-01-01
      • 2020-01-23
      • 1970-01-01
      相关资源
      最近更新 更多