gpt4 book ai didi

flutter : Could not determine the dependencies of task ':shared_preferences:compileDebugAidl'

转载 作者:行者123 更新时间:2023-12-02 16:38:09 26 4
gpt4 key购买 nike

我在 flutter 中创建了新应用程序,当我运行它时它可以工作,但是当我添加shared_preferences包时,我在运行它时收到此错误

FAILURE: Build failed with an exception.

* What went wrong:
Could not determine the dependencies of task ':shared_preferences:compileDebugAidl'.
> Could not resolve all task dependencies for configuration ':shared_preferences:debugCompileClasspath'.
> Could not resolve project :shared_preferences_macos.
Required by:
project :shared_preferences
> Unable to find a matching configuration of project :shared_preferences_macos:
- None of the consumable configurations have attributes.
> Could not resolve project :shared_preferences_web.
Required by:
project :shared_preferences
> Unable to find a matching configuration of project :shared_preferences_web:
- None of the consumable configurations have attributes.

* 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 866ms
Gradle task assembleDebug failed with exit code 1

这是我的 pubspec.yaml

dependencies:
flutter:
sdk: flutter
shared_preferences: ^0.5.3+1

# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.2

这有什么问题,我该如何解决?请帮助我...谢谢

最佳答案

我能够通过运行以下命令解决这个问题:

$ flutter pub cache repair

关于 flutter : Could not determine the dependencies of task ':shared_preferences:compileDebugAidl' ,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59296400/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com