当我在真实设备或仿真器上运行应用程序时,它通常可以正常运行,但是当我执行此操作flutter build apk
时,我会收到此错误,这是什么原因以及如何解决此错误?
[Fatal Error] armeabi_v7a_debug-1.0.0-b6b54fd60631a3828c2e2c9b079b5d1d2d8c8c37.pom:2:10: Already seen doctype.
[Fatal Error] armeabi_v7a_debug-1.0.0-b6b54fd60631a3828c2e2c9b079b5d1d2d8c8c37.pom:2:10: Already seen doctype.
[Fatal Error] armeabi_v7a_debug-1.0.0-b6b54fd60631a3828c2e2c9b079b5d1d2d8c8c37.pom:2:10: Already seen doctype.
[Fatal Error] armeabi_v7a_debug-1.0.0-b6b54fd60631a3828c2e2c9b079b5d1d2d8c8c37.pom:2:10: Already seen doctype.
[Fatal Error] armeabi_v7a_debug-1.0.0-b6b54fd60631a3828c2e2c9b079b5d1d2d8c8c37.pom:2:10: Already seen doctype.
[Fatal Error] armeabi_v7a_debug-1.0.0-b6b54fd60631a3828c2e2c9b079b5d1d2d8c8c37.pom:2:10: Already seen doctype.
FAILURE: Build failed with an exception.
* What went wrong:
Could not determine the dependencies of task ':app:lintVitalRelease'.
> Could not resolve all artifacts for configuration ':app:debugCompileClasspath'.
> Could not resolve io.flutter:armeabi_v7a_debug:1.0.0-b6b54fd60631a3828c2e2c9b079b5d1d2d8c8c37.
Required by:
project :app
> Could not resolve io.flutter:armeabi_v7a_debug:1.0.0-b6b54fd60631a3828c2e2c9b079b5d1d2d8c8c37.
> Could not parse POM http://download.flutter.io/io/flutter/armeabi_v7a_debug/1.0.0-b6b54fd60631a3828c2e2c9b079b5d1d2d8c8c37/armeabi_v7a_debug-1.0.0-b6b54fd60631a3828c2e2c9b079b
5d1d2d8c8c37.pom
> Already seen doctype.
> Could not resolve io.flutter:armeabi_v7a_debug:1.0.0-b6b54fd60631a3828c2e2c9b079b5d1d2d8c8c37.
> Could not parse POM http://download.flutter.io/io/flutter/armeabi_v7a_debug/1.0.0-b6b54fd60631a3828c2e2c9b079b5d1d2d8c8c37/armeabi_v7a_debug-1.0.0-b6b54fd60631a3828c2e2c9b079b
5d1d2d8c8c37.pom
> Already seen doctype.
> Could not resolve io.flutter:armeabi_v7a_debug:1.0.0-b6b54fd60631a3828c2e2c9b079b5d1d2d8c8c37.
> Could not parse POM http://download.flutter.io/io/flutter/armeabi_v7a_debug/1.0.0-b6b54fd60631a3828c2e2c9b079b5d1d2d8c8c37/armeabi_v7a_debug-1.0.0-b6b54fd60631a3828c2e2c9b079b
5d1d2d8c8c37.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 3s
Running Gradle task 'assembleRelease'...
Running Gradle task 'assembleRelease'... Done ٤٫٣s
Gradle task assembleRelease failed with exit code 1
答案 0 :(得分:0)
对我来说,只有在我尝试为x86进行构建时才会发生。我可以在模拟器上构建并运行,这很奇怪。
我正在尝试:
flutter build apk --release --target-platform android-x86