Flutter Session(无法获取资源)

Flutter Session (Could not get resource)

[已解决]

我根据 jeugene 的建议选择了旧版本来解决以下问题。不可用的版本是“0.1.1”,我使用的版本是“0.0.7”。

每次尝试在项目中使用 flutter_session 包时,我都会收到以下错误消息。我一直想知道是否有人遇到过我的问题并可以提出解决方案。

Could not get resource 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-stdlib/1.3.21/kotlin-stdlib-1.3.21.jar'. > Could not GET 'https://jcenter.bintray.com/org/jetbrains/kotlin/kotlin-stdlib/1.3.21/kotlin-stdlib-1.3.21.jar'. > jcenter.bintray.com: Temporary failure in name resolution > Could not get unknown property 'android' for project ':shared_preferences' of type org.gradle.api.Project. * 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 2m 10s Exception: Gradle task assembleDebug failed with exit code 1

我的pubspec.yaml有这些;

dependencies:
    flutter:
        sdk: flutter
    flutter_svg: ^0.18.1
    http: ^0.12.2
    flutter_session: ^0.1.1
    geolocator: ^6.0.0
    geocoder: ^0.2.1
    headup_loading: ^1.0.3

我有这些是 main.dart 文件;

import 'package:flutter_session/flutter_session.dart';

有什么地方做错了吗?

依赖项的间距是否正确。额外的 space 会在 pubspec.yaml 中产生错误。另一种可能性是特定版本可能不可用。尝试相同的旧版本。