在使用android studio的android模拟器上运行新的flutter项目时,会导致以下错误
Launching lib\main.dart on Android SDK built for x86 in debug mode... Running Gradle task 'assembleDebug'... [Fatal Error] x86_64_debug-1.0.0-af51afceb8886cc11e25047523c4e0c7e1f5d408.pom:2:10: Already seen doctype. [Fatal Error] x86_64_debug-1.0.0-af51afceb8886cc11e25047523c4e0c7e1f5d408.pom:2:10: Already seen doctype. [Fatal Error] x86_64_debug-1.0.0-af51afceb8886cc11e25047523c4e0c7e1f5d408.pom:2:10: Already seen doctype. [Fatal Error] flutter_embedding_debug-1.0.0-af51afceb8886cc11e25047523c4e0c7e1f5d408.pom:2:10: Already seen doctype. [Fatal Error] flutter_embedding_debug-1.0.0-af51afceb8886cc11e25047523c4e0c7e1f5d408.pom:2:10: Already seen doctype. [Fatal Error] flutter_embedding_debug-1.0.0-af51afceb8886cc11e25047523c4e0c7e1f5d408.pom:2:10: Already seen doctype. [Fatal Error] x86_debug-1.0.0-af51afceb8886cc11e25047523c4e0c7e1f5d408.pom:2:10: Already seen doctype. [Fatal Error] x86_debug-1.0.0-af51afceb8886cc11e25047523c4e0c7e1f5d408.pom:2:10: Already seen doctype. [Fatal Error] x86_debug-1.0.0-af51afceb8886cc11e25047523c4e0c7e1f5d408.pom:2:10: Already seen doctype. [Fatal Error] x86_64_debug-1.0.0-af51afceb8886cc11e25047523c4e0c7e1f5d408.pom:2:10: Already seen doctype. [Fatal Error] flutter_embedding_debug-1.0.0-af51afceb8886cc11e25047523c4e0c7e1f5d408.pom:2:10: Already seen doctype. [Fatal Error] x86_debug-1.0.0-af51afceb8886cc11e25047523c4e0c7e1f5d408.pom:2:10: Already seen doctype. [Fatal Error] x86_64_debug-1.0.0-af51afceb8886cc11e25047523c4e0c7e1f5d408.pom:2:10: Already seen doctype. [Fatal Error] flutter_embedding_debug-1.0.0-af51afceb8886cc11e25047523c4e0c7e1f5d408.pom:2:10: Already seen doctype. [Fatal Error] x86_debug-1.0.0-af51afceb8886cc11e25047523c4e0c7e1f5d408.pom:2:10: Already seen doctype. [Fatal Error] x86_64_debug-1.0.0-af51afceb8886cc11e25047523c4e0c7e1f5d408.pom:2:10: Already seen doctype. [Fatal Error] flutter_embedding_debug-1.0.0-af51afceb8886cc11e25047523c4e0c7e1f5d408.pom:2:10: Already seen doctype. [Fatal Error] x86_debug-1.0.0-af51afceb8886cc11e25047523c4e0c7e1f5d408.pom:2:10: Already seen doctype.
FAILURE: Build failed with an exception.
* What went wrong: Could not determine the dependencies of task ':app:compileDebugJavaWithJavac'.
> Could not resolve all task dependencies for configuration ':app:debugCompileClasspath'.
> Could not resolve io.flutter:flutter_embedding_debug:1.0.0-af51afceb8886cc11e25047523c4e0c7e1f5d408.
Required by:
project :app
> Could not resolve io.flutter:flutter_embedding_debug:1.0.0-af51afceb8886cc11e25047523c4e0c7e1f5d408.
> Could not parse POM http://download.flutter.io/io/flutter/flutter_embedding_debug/1.0.0-af51afceb8886cc11e25047523c4e0c7e1f5d408/flutter_embedding_debug-1.0.0-af51afceb8886cc11e25047523c4e0c7e1f5d408.pom
> Already seen doctype.
> Could not resolve io.flutter:flutter_embedding_debug:1.0.0-af51afceb8886cc11e25047523c4e0c7e1f5d408.
> Could not parse POM http://download.flutter.io/io/flutter/flutter_embedding_debug/1.0.0-af51afceb8886cc11e25047523c4e0c7e1f5d408/flutter_embedding_debug-1.0.0-af51afceb8886cc11e25047523c4e0c7e1f5d408.pom
> Already seen doctype.
> Could not resolve io.flutter:flutter_embedding_debug:1.0.0-af51afceb8886cc11e25047523c4e0c7e1f5d408.
> Could not parse POM http://download.flutter.io/io/flutter/flutter_embedding_debug/1.0.0-af51afceb8886cc11e25047523c4e0c7e1f5d408/flutter_embedding_debug-1.0.0-af51afceb8886cc11e25047523c4e0c7e1f5d408.pom
> Already seen doctype.
> Could not resolve io.flutter:x86_debug:1.0.0-af51afceb8886cc11e25047523c4e0c7e1f5d408.
Required by:
project :app
> Could not resolve io.flutter:x86_debug:1.0.0-af51afceb8886cc11e25047523c4e0c7e1f5d408.
> Could not parse POM http://download.flutter.io/io/flutter/x86_debug/1.0.0-af51afceb8886cc11e25047523c4e0c7e1f5d408/x86_debug-1.0.0-af51afceb8886cc11e25047523c4e0c7e1f5d408.pom
> Already seen doctype.
> Could not resolve io.flutter:x86_debug:1.0.0-af51afceb8886cc11e25047523c4e0c7e1f5d408.
> Could not parse POM http://download.flutter.io/io/flutter/x86_debug/1.0.0-af51afceb8886cc11e25047523c4e0c7e1f5d408/x86_debug-1.0.0-af51afceb8886cc11e25047523c4e0c7e1f5d408.pom
> Already seen doctype.
> Could not resolve io.flutter:x86_debug:1.0.0-af51afceb8886cc11e25047523c4e0c7e1f5d408.
> Could not parse POM http://download.flutter.io/io/flutter/x86_debug/1.0.0-af51afceb8886cc11e25047523c4e0c7e1f5d408/x86_debug-1.0.0-af51afceb8886cc11e25047523c4e0c7e1f5d408.pom
> Already seen doctype.
> Could not resolve io.flutter:x86_64_debug:1.0.0-af51afceb8886cc11e25047523c4e0c7e1f5d408.
Required by:
project :app
> Could not resolve io.flutter:x86_64_debug:1.0.0-af51afceb8886cc11e25047523c4e0c7e1f5d408.
> Could not parse POM http://download.flutter.io/io/flutter/x86_64_debug/1.0.0-af51afceb8886cc11e25047523c4e0c7e1f5d408/x86_64_debug-1.0.0-af51afceb8886cc11e25047523c4e0c7e1f5d408.pom
> Already seen doctype.
> Could not resolve io.flutter:x86_64_debug:1.0.0-af51afceb8886cc11e25047523c4e0c7e1f5d408.
> Could not parse POM http://download.flutter.io/io/flutter/x86_64_debug/1.0.0-af51afceb8886cc11e25047523c4e0c7e1f5d408/x86_64_debug-1.0.0-af51afceb8886cc11e25047523c4e0c7e1f5d408.pom
> Already seen doctype.
> Could not resolve io.flutter:x86_64_debug:1.0.0-af51afceb8886cc11e25047523c4e0c7e1f5d408.
> Could not parse POM http://download.flutter.io/io/flutter/x86_64_debug/1.0.0-af51afceb8886cc11e25047523c4e0c7e1f5d408/x86_64_debug-1.0.0-af51afceb8886cc11e25047523c4e0c7e1f5d408.pom
> Already seen doctype.
* 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 4s Finished with error: Gradle task assembleDebug failed with exit code 1
我正在为Android Studio 3.6.3使用以下dart和flutter插件版本
Flutter Doctor -v
[√] Flutter(频道稳定,v1.12.13 + hotfix.9,在Microsoft Windows [Version 10.0.18363.720],语言环境为美国) •位于G:\ Programs \ Installed Programs \ flutter的Flutter 1.12.13 + hotfix.9版本 •框架修订版f139b11009(3周前),2020-03-30 13:57:30 -0700 •发动机版本af51afceb8 •Dart版本2.7.2
[√] Android工具链-为Android设备开发(Android SDK版本29.0.2) •Android SDK位于G:\ Programs \ Android \ SDK •未配置Android NDK位置(可选;对本机分析支持有用) •平台android-29,构建工具29.0.2 •ANDROID_HOME = G:\ Programs \ Android \ SDK •Java二进制文件位于:C:\ Program Files \ Android \ Android Studio \ jre \ bin \ java •Java版本OpenJDK运行时环境(内部版本1.8.0_212-发行版1586-b04) •接受所有Android许可。
[√] Android Studio(3.6版) •位于C:\ Program Files \ Android \ Android Studio的Android Studio •Flutter插件版本45.1.1 •Dart插件版本192.7761 •Java版本OpenJDK运行时环境(内部版本1.8.0_212-发行版1586-b04)
[√]已连接设备(1个可用) •为x86构建的Android SDK•仿真器-5554•android-x86•Android 8.1.0(API 27)(仿真器)
•找不到问题!
尝试了flutter pub cache repair
,但没有任何改变