google / charts

https://pub.dev/packages/charts_flutter
Apache License 2.0
2.8k stars 1.2k forks source link

Error: The current Dart SDK version is 2.1.0-dev.9.4.flutter-f9ebf21297 #212

Open firedevelop opened 5 years ago

firedevelop commented 5 years ago

Hello! I want to use these nice charts, but I have some issues. Please, can you help me?

I did flutter upgrade

DHJW-iMac-2011:charts admin$ flutter upgrade
Upgrading Flutter from /Applications/flutter...
Already up to date.
DHJW-iMac-2011:charts admin$ flutter upgrade
Upgrading Flutter from /Applications/flutter...
Already up to date.

Upgrading engine...
Already up-to-date.

Flutter 1.0.0 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 5391447fae (3 months ago) • 2018-11-29 19:41:26 -0800
Engine • revision 7375a0f414
Tools • Dart 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297)

Running flutter doctor...
Doctor summary (to see all details, run flutter doctor -v):
[✓] Flutter (Channel stable, v1.0.0, on Mac OS X 10.13.6 17G5019, locale en-US)
[✓] Android toolchain - develop for Android devices (Android SDK 28.0.3)
[✓] iOS toolchain - develop for iOS devices (Xcode 10.1)
[✓] Android Studio (version 3.3)
[✓] IntelliJ IDEA Community Edition (version 2018.3.3)
[✓] Connected device (1 available)

• No issues found!
DHJW-iMac-2011:charts admin$ 

here my pubspec.yaml:

name: charts_flutter
version: 0.6.0
description: Material Design charting library for flutter.
author: Charts Team <charts_flutter@google.com>
homepage: https://github.com/google/charts

environment:
  sdk: '>=1.23.0 <3.0.0'

dependencies:
  # Pointing this to a local path allows for pointing to the latest code
  # in Github for open source development.
  #
  # The pub version of charts_flutter will point to the pub version of charts_common.
  # The latest pub version is commented out and shown below as an example.
  # charts_common: 0.6.0
  charts_common:
    path: ../charts_common/
  collection: ^1.14.5
  flutter:
    sdk: flutter
  intl: ^0.15.2
  logging: any
  meta: ^1.1.1

dev_dependencies:
  mockito:
  flutter_test:
    sdk: flutter
  test: ^1.3.0

I proyect are in the path:

DHJW-iMac-2011:charts admin$ pwd
/Volumes/6TB/production-VARIOS/Github/id0000150_flutter_dart_example/id0000150_9/charts

Also I did flutter packages get

DHJW-iMac-2011:charts_flutter admin$ pwd
/Volumes/6TB/production-VARIOS/Github/id0000150_flutter_dart_example/id0000150_9/charts/charts_flutter
DHJW-iMac-2011:charts_flutter admin$ flutter packages get
Running "flutter packages get" in charts_flutter...              
The current Dart SDK version is 2.1.0-dev.9.4.flutter-f9ebf21297.

Because charts_flutter depends on charts_common from the path which requires SDK version >=2.1.0 <3.0.0, version solving failed.

pub get failed (1)
DHJW-iMac-2011:charts_flutter admin$ 

Please any help will be appreciate. Thanks so much!

kieron-mcintyre commented 5 years ago

Yes, I'm also having this issue. Quite confused.

firedevelop commented 5 years ago

I hope they can fix soon as possible, the carts are very nice.

On Fri, Feb 22, 2019 at 5:42 PM Kieron McIntyre notifications@github.com wrote:

Yes, I'm also having this issue. Quite confused.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/google/charts/issues/212#issuecomment-466461933, or mute the thread https://github.com/notifications/unsubscribe-auth/Ab_7JZZBWsTaLwy82L-0OiNM9M_oj3P4ks5vQB3hgaJpZM4bJaw- .

zoechi commented 5 years ago

switch to dev channel until a new stable is out (hopefully soon)

flutter channel dev
flutter doctor
ascmp commented 5 years ago

To state the obvious, the issue is that Flutter 1.0.0 (channel stable) uses Dart 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297), where 2.1.0-dev version is considered to be strictly smaller than 2.1.0, while "charts_flutter depends on charts_common [...] requires SDK version >=2.1.0".

kieron-mcintyre commented 5 years ago

@ascmp I see, by 'strictly smaller' you mean a lower version. So this package currently can't be used with Flutter's stable release.

As @zoechi suggests, I've been able to change to the Flutter beta channel (which is presumably more stable than dev) and I can use the charts package now. Thanks for your help!

MAVERlCK commented 5 years ago

Should be solved by now using stable channel.

thanhgiangleo commented 5 years ago

upgrade Dart & Flutter version, the problem will be solved.

Allan-Nava commented 5 years ago

I got this error:

══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
03-13 18:09:09.856 7779-7812/ I/flutter: The following assertion was thrown building NetworkLoadPage(dirty, state:
03-13 18:09:09.856 7779-7812/it.I/flutter: _NetworkLoadPageState#62f25):
03-13 18:09:09.856 7779-7812/it.I/flutter: type 'List<Series<dynamic, dynamic>>' is not a subtype of type 'List<Series<dynamic, num>>'
03-13 18:09:09.865 7779-7812/it.e I/flutter: Either the assertion indicates an error in the framework itself, or we should provide substantially
03-13 18:09:09.865 7779-7812/it.i I/flutter: more information in this error message to help you determine and fix the underlying cause.
03-13 18:09:09.866 7779-7812/it.I/flutter: In either case, please report this assertion by filing a bug on GitHub:
03-13 18:09:09.866 7779-7812/it I/flutter:   https://github.com/flutter/flutter/issues/new?template=BUG.md
siannas commented 3 years ago

I got the same error message after download the newer version. And solved it by deleting my previous flutter and dart on my environment path and assign a new flutter path to it.

franckmutomukulu commented 3 years ago

I got this error:

══╡ EXCEPTION CAUGHT BY WIDGETS LIBRARY ╞═══════════════════════════════════════════════════════════
03-13 18:09:09.856 7779-7812/ I/flutter: The following assertion was thrown building NetworkLoadPage(dirty, state:
03-13 18:09:09.856 7779-7812/it.I/flutter: _NetworkLoadPageState#62f25):
03-13 18:09:09.856 7779-7812/it.I/flutter: type 'List<Series<dynamic, dynamic>>' is not a subtype of type 'List<Series<dynamic, num>>'
03-13 18:09:09.865 7779-7812/it.e I/flutter: Either the assertion indicates an error in the framework itself, or we should provide substantially
03-13 18:09:09.865 7779-7812/it.i I/flutter: more information in this error message to help you determine and fix the underlying cause.
03-13 18:09:09.866 7779-7812/it.I/flutter: In either case, please report this assertion by filing a bug on GitHub:
03-13 18:09:09.866 7779-7812/it I/flutter:   https://github.com/flutter/flutter/issues/new?template=BUG.md

Be sure you are running the command as an admin: