【问题标题】:I get an error while receiving the APK of the Flutter project收到 Flutter 项目的 APK 时出错
【发布时间】:2021-10-30 17:47:50
【问题描述】:

我想删除我的 Flutter 项目的应用程序。 Flutter Build APK 我遇到这样的问题

Project evaluation failed including an error in afterEvaluate {}. Run with --stacktrace for details of the afterEvaluate {} error.

FAILURE:构建失败并出现异常。

  • 在哪里: 构建文件 'C:\src\flutter.pub-cache\hosted\pub.dartlang.org\path_provider-2.0.4\android\build.gradle' 行:57

  • 出了什么问题: 评估根项目“path_provider”时出现问题。

在 org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler 类型的对象上找不到参数 [junit:junit:4.12] 的方法 testImplementation()。

  • 尝试: 使用 --stacktrace 选项运行以获取堆栈跟踪。使用 --info 或 --debug 选项运行以获得更多日志输出。运行 --scan 以获得完整的见解。

  • 通过https://help.gradle.org获得更多帮助

1 秒内构建失败

由于上述问题,无法构建插件 path_provider。

【问题讨论】:

    标签: android ios flutter


    【解决方案1】:

    升级 path_provider 然后转到项目结构 > 项目 > 并更改 摇篮版本: 安卓插件版本: 根据此处给出的表格: https://developer.android.com/studio/releases/gradle-plugin#updating-gradle

    然后 Flutter clean > flutter pub get > Flutter build apk

    【讨论】:

      猜你喜欢
      • 2020-11-18
      • 1970-01-01
      • 2021-09-27
      • 2020-10-02
      • 2017-07-03
      • 2021-08-26
      • 2019-03-06
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多