技术咸鱼 技术咸鱼
首页
  • 《Django教程》
  • 《VuePress教程》
应用
  • 技术文档
  • GitHub技巧
  • Nodejs
  • 博客搭建
  • 网站
  • 资源
  • Vue资源网站
  • Flutter资源网站
  • 分类
  • 标签
  • 归档
关于
头像

公众号:技术咸鱼
首页
  • 《Django教程》
  • 《VuePress教程》
应用
  • 技术文档
  • GitHub技巧
  • Nodejs
  • 博客搭建
  • 网站
  • 资源
  • Vue资源网站
  • Flutter资源网站
  • 分类
  • 标签
  • 归档
关于
  • IDE

  • Markdown

  • 爬虫

  • Android

  • flutter

    • CocoaPods's specs repository is too out-of-date to satisfy dependencies
    • Waiting for another flutter command to release the startup lock
    • Flutter 解决Flutter Conflicting outputs were detected and the build is unable to prompt for permiss
      • 出现情景
      • 出现原因
      • 解决方法
  • Mac

  • 错误整理
  • flutter
技术咸鱼
2019-05-12

标题 Flutter 解决Flutter Conflicting outputs were detected and the build is unable to prompt for permiss

# 出现情景

在使用flutter packages pub run build_runner buildJSON序列化出现冲突生,无法生成.g.dart文件.

[INFO] Checking for unexpected pre-existing outputs....
[INFO] Found 36 declared outputs which already exist on disk. This is likely because the`.dart_tool/build` folder was deleted, or you are submitting generated files to your source repository.
[SEVERE] Conflicting outputs were detected and the build is unable to prompt for permission to remove them. These outputs must be removed manually or the build can be run with `--delete-conflicting-o
utputs`. The outputs are: lib/data/http/rsp/UserInfoModel.g.dart
 
[INFO] Generating build script...
1
2
3
4
5
6

# 出现原因

运行flutter packages pub run build_runner build除了生成.g.dart文件.同时还会生成了一个dart_tool/build目录. 当再次生成新的.g.dart因为缺少之前生成dart_tool/build目下的文件就会报错.不过运行app是没有问题的,之前g.dart还可以用.

# 解决方法

flutter packages pub run build_runner clean

flutter packages pub run build_runner build --delete-conflicting-outputs
1
2
3
#flutter#dart
上次更新: 2023/01/12, 14:27:54
Waiting for another flutter command to release the startup lock
Error:homebrew-core is a shallow clone

← Waiting for another flutter command to release the startup lock Error:homebrew-core is a shallow clone→

最近更新
01
Mac使用ngrok内网穿透
01-04
02
Gradle build failed to produce an .apk file.
07-28
03
flutter构建为 Web 应用
07-27
更多文章>
Copyright © 2019-2023 oopanda | 皖ICP备19017961号-1
  • 跟随系统
  • 浅色模式
  • 深色模式
  • 阅读模式
×
×