我正在尝试在我的依赖项中添加 path_provider 包,但我总是收到此错误:
The current Flutter SDK version is 0.0.0-unknown.
Because lista_tarefas depends on path_provider >=0.4.0 which requires Flutter SDK version >=0.1.4 <2.0.0, version solving failed.
pub upgrade failed (1)
Run Code Online (Sandbox Code Playgroud)
我已经试过了:
我当前的 pubspec.yaml 文件:
...
version: 1.0.0+1
environment:
sdk: ">=2.0.0-dev.68.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 …Run Code Online (Sandbox Code Playgroud) 我将项目迁移到AndroidX,原因是我遇到了一些错误,但是现在我收到了一个错误循环,表明androidX类的版本与编译版本不同:
Android dependency 'androidx.fragment:fragment' has different version for the compile (1.0.0-rc01) and runtime (1.1.0-alpha04) classpath. You should manually set the same version via DependencyResolution
Run Code Online (Sandbox Code Playgroud)
而且它总是一个不同的类,我已经尝试实现此代码,但是每次我添加一行代码时,它都会给我另一个不同于编译的类:
configurations.all {
resolutionStrategy {
force 'androidx.fragment:fragment:v4:1.1.0-alpha04'
}
}
Run Code Online (Sandbox Code Playgroud)