颤振生成APK中的错误

时间:2020-10-14 21:22:15

标签: flutter dart

使用flutter build apk时出现相同的错误。

我想创建仅安装在Android设备上的APK,而不是要在Google Play上发布的APK。 我可以在终端中使用任何代码来解决此问题吗?

错误:

     FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:lintVitalRelease'.
> Could not delete old \build\app\reports\lint-results-release-fatal.html

* 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 6s
Running Gradle task 'assembleRelease'...
Running Gradle task 'assembleRelease'... Done                       7.6s
Gradle task assembleRelease failed with exit code 1

颤抖的医生-v:

Doctor summary (to see all details, run flutter doctor -v):
[√] Flutter (Channel stable, 1.20.3, on Microsoft Windows [Version 10.0.18363.1082], locale ar-IQ)

[!] Android toolchain - develop for Android devices (Android SDK version 29.0.2)
    ! Some Android licenses not accepted.  To resolve this, run: flutter doctor --android-licenses
edition (version 1.33.1)
[√] Connected device (1 available)

! Doctor found issues in 2 categories.

我如何解决此错误。

感谢所有人

1 个答案:

答案 0 :(得分:0)

要解决许可证问题,请在终端中输入

Navigator.of(context).push(
    MaterialPageRoute(builder: (context) => BlocRouter().counterDetail()),
);