android - 将图片下载器添加到Flutter应用时出错

标签 android firebase gradle flutter dart

将image_downloader插件集成到flutter应用程序时,我遇到了这个问题。

我还集成了Firebase存储。

注意:-在我添加了image_downloader之后,该应用程序可以很好地与Firebase存储配合使用

错误:


* Error running Gradle:
ProcessException: Process "C:\Users\boood\AndroidStudioProjects\firebase_neten\android\gradlew.bat" exited abnormally:

> Configure project :app
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
registerResGeneratingTask is deprecated, use registerGeneratedResFolders(FileCollection)
         *********************************************************
WARNING: This version of firebase_core will break your Android build if it or its dependencies aren't compatible with AndroidX.
         See https://flutter.dev/docs/development/androidx-migration for more information on the problem and how to fix it.
         This warning prints for all Android build failures. The real root cause of the error may be unrelated.
         *********************************************************


FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring project ':image_downloader'.
> Failed to notify project evaluation listener.
   > java.lang.AbstractMethodError (no error message)

* 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 1s
  Command: C:\Users\boood\AndroidStudioProjects\firebase_neten\android\gradlew.bat app:properties

我的发布规范:
cupertino_icons: ^0.1.2
image_downloader:
firebase_storage:
image_picker:

最佳答案

确保您始终获得正确的版本,到目前为止,当前版本为:
image_downloader:^ 0.19.1

另外,请确保您要添加到pubspec上的正确位置,
应该在“依赖项”内,缩进方式与“flutter”相同。

关于android - 将图片下载器添加到Flutter应用时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/58593273/

相关文章:

安卓 "No view found for id for fragment"

ios - 无法使用 iOS Swift API 将图片上传到 Google Firebase 存储

android - Android Studio 中的 Base64 依赖问题

gradle - 将额外属性传递给Gradle任务的问题

firebase - 监控 Firebase 存储变化的最佳方式

java - Spring.io REST 教程中的构建错误

android edittext inputType :textpassword not working with intputType:actionDone on some devices

android - 动态添加数据行

android - 本地通知的ID是否需要全局唯一?

ios - 如何在 Firebase 上的用户属性中发送号码?