当我添加依赖项shared_preferences时:^ 0.5.8
其中: 脚本'D:\ flutter \ packages \ flutter_tools \ gradle \ flutter.gradle'行:362
出了什么问题: 配置项目':shared_preferences_linux'时发生问题。
在类型org.gradle.api.internal.artifacts.dsl.dependencies.DefaultDependencyHandler的对象上找不到参数[project':path_provider_linux']的方法Implementation()。
pubspec.ymal
environment:
sdk: ">=2.1.0 <3.0.0"
dependencies:
flutter:
sdk: flutter
# The following adds the Cupertino Icons font to your application.
# Use with the CupertinoIcons class for iOS style icons.
cupertino_icons: ^0.1.2
shared_preferences: ^0.5.8
dev_dependencies:
flutter_test:
sdk: flutter
答案 0 :(得分:0)
您必须显示pubspec.yaml文件
答案 1 :(得分:0)
问题已经解决,原因是SDK版本太低,v1,12.13 + h9更新为1.17.5