【问题标题】:app runs normally on real device and emulator but don't work when generating apk应用程序在真机和模拟器上正常运行,但在生成 apk 时不工作
【发布时间】:2020-04-16 17:53:08
【问题描述】:

当我在真实设备或模拟器上运行应用程序时,它通常可以工作,但是当我这样做时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

【问题讨论】:

    标签: flutter


    【解决方案1】:

    对我来说,只有在我尝试为 x86 构建时才会发生这种情况。我可以在模拟器上构建和运行,这很奇怪。

    我正在尝试这个:

    flutter build apk --release --target-platform android-x86
    

    【讨论】:

      猜你喜欢
      • 2020-01-08
      • 2015-12-06
      • 2021-04-04
      • 1970-01-01
      • 1970-01-01
      • 2017-11-14
      • 2014-09-01
      • 1970-01-01
      • 2016-09-02
      相关资源
      最近更新 更多