Search code examples
fluttersessionflutter-dependenciesflutter-packages

Flutter Session (Could not get resource)


[Solved]

I went for an older version as jeugene suggested to solve the below problem. The unavailable version is "0.1.1", the version I used is "0.0.7".

I keep getting the bellow error every time I try using the flutter_session package on a project. I've been wondering if there's someone out there who has had my kind of problem and can propose a solution.

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

My pubspec.yaml has these;

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

and I have these is the main.dart file;

import 'package:flutter_session/flutter_session.dart';

Is there something am doing wrong?


Solution

  • Is the spacing of the dependencies correct. Extra space can create errors in pubspec.yaml. Another possibility is that the specific version might not be available. Try older version of the same.