Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Flutter Error: The current Flutter SDK version is 2.1.0-dev.0.0.flutter-be6309690f

Tags:

flutter

dart

I've just upgraded my flutter, after upgradation I am unable to run any flutter project on my Android Studio. I am getting this error message.

The current Dart SDK version is 2.1.0-dev.0.0.flutter-be6309690f.

Because buddy depends on flutter_built_redux 0.4.5 which requires SDK 
version >=1.19.0 <2.0.0, version solving failed.                                                  
pub get failed (1)

How can I downgrade Dart or how can I resolve this issue, I am running android studio on mac.

I've tried by changing flutter channels dev and master but it doesn't make a difference.

flutter doctor -v result:

[✓] Flutter (Channel dev, v0.6.0, on Mac OS X 10.13.4 17E202, locale en-IN)
• Flutter version 0.6.0 at /Users/pro/Downloads/flutter
• Framework revision 9299c02cf7 (5 days ago), 2018-08-16 00:35:12 +0200
• Engine revision e3687f70c7
• Dart version 2.1.0-dev.0.0.flutter-be6309690f

[✓] Android toolchain - develop for Android devices (Android SDK 27.0.3)
  • Android SDK at /Users/pro/Library/Android/sdk
  • Android NDK location not configured (optional; useful for native 
     profiling support)
  • Platform android-27, build-tools 27.0.3
  • Java binary at: /Applications/Android 
     Studio.app/Contents/jre/jdk/Contents/Home/bin/java
  • Java version OpenJDK Runtime Environment (build 1.8.0_152-release- 
     1024-b01)
• All Android licenses accepted.

[✓] iOS toolchain - develop for iOS devices (Xcode 9.4.1)
• Xcode at /Applications/Xcode.app/Contents/Developer
• Xcode 9.4.1, Build version 9F2000
• ios-deploy 1.9.2
• CocoaPods version 1.5.0

[✓] Android Studio (version 3.1)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin version 27.1.1
• Dart plugin version 173.4700
• Java version OpenJDK Runtime Environment (build 1.8.0_152-release-1024-b01)

[!] Connected devices
! No devices available
like image 357
Ammy Kang Avatar asked Aug 21 '18 07:08

Ammy Kang


People also ask

How do I update my flutter SDK to a specific version?

Upgrading the Flutter SDK This command gets the most recent version of the Flutter SDK that's available on your current Flutter channel. If you want an even more recent version of the Flutter SDK, switch to a less stable Flutter channel and then run flutter upgrade .

How do I fix the flutter SDK installation is incomplete?

Go to edit variables (This PC > properties > Advanced system settings > Advanced > Environment Variables). Edit (create if not exist) Path variable to "Extracted files: flutter\bin" then click ok. Download and install Git from https://git-scm.com/download/win. Open cmd, write "flutter", wait to download.


2 Answers

Flutter includes a bundled Dart SDK (under its bin/cache directory) pinned to the same version used in the engine that we compile into your shipping iOS/Android app. As such, the only way to use Flutter with a different version of Dart is to use an older version of Flutter.

To do this, cd to the Flutter SDK directory. You can list the available versions by running git tag. To switch to a version, use git checkout. For example, to switch to v0.8.1 you’d run git checkout v0.8.1. When you’d like to switch back to the beta channel, run git checkout beta.

That said, generally I’d advise you to stick to beta and file an issue (or send a pull request) to the maintainer of any packages that haven’t yet been updated to Dart 2. You may also want to check the dependencies listed in your pubspec.yaml to see if there are newer versions available on pub.dartlang.org. It may just be a matter of updating your dependencies to a newer version.

like image 174
cbracken Avatar answered Oct 14 '22 07:10

cbracken


flutter_built_redux package doesn't met the flutter dependency. The error is caused by package not by flutter sdk.

see here https://github.com/davidmarne/flutter_built_redux/blob/master/pubspec.yaml#L22

AND

you can post issue on flutter_built_redux package using this link https://github.com/davidmarne/flutter_built_redux/issues/new?title=support%20for%20flutter%20sdk%202.1.0.dev&body=please%20upgrade%20the%20package%20for%20new%20flutter%20releases

like image 42
Aravind Vemula Avatar answered Oct 14 '22 05:10

Aravind Vemula