将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/