0

最近升级了flutter和dart,意外遇到了这个错误。一切都很好,我刚刚重新启动项目,错误就在那里!

错误:

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

出了什么问题:任务 ':path_provider_android:compileDebugJavaWithJavac' 执行失败。编译失败;有关详细信息,请参阅编译器错误输出。

我的 pubspec.yml 依赖项:

 dependencies:
  auto_animated: any
  awesome_dialog: ^2.1.1
  cached_network_image: ^3.0.0
  carousel_slider: ^3.0.0
  circular_countdown_timer: ^0.2.0
  cupertino_icons: ^1.0.0
  dropdown_search: ^2.0.1
  dropdownfield: ^1.0.3
  email_validator: ^2.0.1
  expandable: ^5.0.1
  firebase_core: ^1.10.2
  firebase_messaging: ^11.2.0
  flutter:
    sdk: flutter
  flutter_animator: ^3.2.0
  flutter_html: ^0.8.2
  flutter_launcher_icons: any
  flutter_local_notifications: ^6.0.0
  flutter_spinkit: ^5.0.0
  flutter_tags: ^0.4.9+1
  flutter_zoom_drawer: ^2.1.1
  google_fonts: any
  http: ^0.13.1
  image: ^3.0.2
  image_picker: ^0.7.4
  image_size_getter: ^1.0.0
  intl: ^0.17.0
  material_design_icons_flutter: 4.0.5955
  mime: ^1.0.0
  page_transition: ^1.0.9
  progress_indicators: ^1.0.0
  provider: ^6.0.1
  shared_preferences: ^2.0.6
  swipe_cards: ^0.1.0
  syncfusion_flutter_datepicker: ^19.3.56
  textfield_tags: ^1.1.1
  upgrader: ^3.3.0
  url_launcher: ^6.0.3
  webview_flutter: ^0.3.0
  path_provider: ^2.0.1
  open_file: ^3.1.0

我试过的:

  • 颤振升级
  • Flutter clean 和 flutter get
  • 更改最低 SDK 版本
4

2 回答 2

0

我通过升级AndroidStudio版本解决了,可能是开发工具版本低导致的,</p>

于 2021-12-08T02:18:10.793 回答
0

在我重新安装颤振并从头开始创建一个项目并复制我的旧代码后,问题得到了解决。此外,Firebase 现在仅在您的最低 SDK 版本为 19 时才兼容。

于 2021-12-07T12:13:19.267 回答