为什么在将image_picker添加到我的dependencies时会出现渐变构建错误



我只是简单地将image_picker:添加到我的依赖项中,在我进行pub升级后,我无法构建项目。我收到这个错误消息:

FAILURE: Build failed with an exception.
* What went wrong:
A problem occurred configuring project ':flutter_plugin_android_lifecycle'.
> Could not load compiled classes for build file 'C:flutter.pub-cachehostedpub.dartlang.orgflutter_plugin_android_lifecycle-2.0.5androidbuild.gradle' from cache.

我的依赖看起来是这样的:

dependencies:
image_picker: ^0.8.4+11
flutter:
sdk: flutter

# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^1.0.2
google_fonts: ^2.2.0
sqflite: ^2.0.0+3
intl: ^0.17.0
path_provider: ^2.0.1

奇怪的是,当我在一个新项目中这样做时,一切都很好。即使是图像拾取器也可以平稳运行。唯一的区别是在我的旧项目中使用6.7级和7.4级。为什么会发生这种情况?

我通过将渐变版本更改为旧版本来修复它

相关内容

最新更新