Dart SDK not install - dart

I want to get started with flutter web so I am trying to install dart-sdk for windows (stable version Link: https://gekorm.com/dart-windows/) but it doesn't download.it always show a message,download failed:The operation timed out.

actually you don't need to install dart SDK separately, because flutter SDK comes with dart SDK together in one zip.
to start flutter web app you need to change flutter channel to beta and enable web configuration :
flutter channel beta
flutter upgrade
flutter config --enable-web
or I recommend downloading the flutter beta SDK from here:
and use separately it from your stable SDK
you can find more info about flutter web here

Related

Downgrade SDK Dart to build App on MacBook

I have an old MacBook here, and I need to build an app on it to test on an iPhone, the problem is that the app was created using the newest version of flutter. And as you may know, MacBook does not allow to install Flutter in XCode older than Flutter version 13,
and I was wondering if I would downgrade the Dart/Flutter SDK I will have problems and how to solve them?
the message displayed on console is:
[!] Xcode - develop for iOS and macOS (Xcode 12.4)
• Xcode at /Applications/Xcode.app/Contents/Developer
! Flutter recommends a minimum Xcode version of 13.
Download the latest version or update via the Mac App Store.
• CocoaPods version 1.10.1
Yes, you can install other versions of flutter to build your application with it. You can either do so manually or use the flutter version manager (fvm) for that.
Download links for all flutter releases can be found in the flutter documentation.
These older releases of flutter then have different requirements for the Xcode versions.

Run Flutter Android Built App on IOS Device

I am very new to flutter and require your help.
I have built my complete flutter app for android, and now I want to test the same on Iphone, how is it possible?
I tried few tutorials starting with "flutter build ios --release" , but nothing is working for me
You need to have a mac, or use codemagic or get macOS on the VirtualBox on your windows system!
Xcode is required to build and release iOS app. You must use a device running on macOS.
Please refer official doc : https://docs.flutter.dev/deployment/ios
After successfully configuration, use flutter build ios command to build iOS app.
You need to have a Mac and Xcode to build and release iOS app.
However, you can use simple external tools to do so.
For example, Appollo (https://github.com/Appollo-CLI/Appollo), it is a python CLI that lets you access remote MacOS build machines.
You can install it with:
pip install appollo
You can checkout their Youtube channel for some quick tutorials, https://www.youtube.com/channel/UCBNRrJd4UP0QQRoYF4JOEmA or the official doc, https://appollo.readthedocs.io/en/master/tutorial/index.html

Installing flutter on Mac iOS

Unfortunately, I couldn’t install flutter on my MacBook Air. Every time I install flutter SDK I see some documents but none of them leads to extract flutter? I can’t find the folder flutter_macOS?
Do you have install flutter SDK follow by official document?
[https://docs.flutter.dev/get-started/install/macos]
Document need required 2 steps,
Step1: download Flutter SDK and extract zip.
Step 2: set Path for ternimal
Notes: You need set path Flutter SDK if the IDE need to required (Ex: Android Studio)
I hope helpfully for you

Android studio new version BumbleBee show error when run old project in IOS Device/Simulator in Flutter

It Will shows Error like this:-
After updating the Android studio it's throwing the error in IOS run
Warning: CocoaPods not installed. Skipping pod install.
CocoaPods is used to retrieve the iOS and macOS platform side's plugin code that responds to your plugin usage on the Dart side.
Without CocoaPods, plugins will not work on iOS or macOS.
For more info, see https://flutter.dev/platform-plugins
To install see https://guides.cocoapods.org/using/getting-started.html#installation for instructions.
CocoaPods not installed or not in valid state.
Error launching application on iPhone 13 Pro Max.
It's run easily in android device and when we run through terminal its runs easily.
I have the same issue and I am hoping they will fix it soon. But, running flutter run from the terminal window inside Android Studio works fine and I can build and deploy for Android and iOS devices. Not a great solution, but works for now.
Upgrade with the new version of Bumblebee resolve the issue for me
Version: Android Studio Bumblebee | 2021.1.1 Patch 1

update dart sdk for flutter

I would like to use dart SDK >= 2.2.0 with flutter. But my current version used BY Flutter is 2.1.2
flutter --version
Flutter 1.2.1 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 8661d8aecd (2 months ago) • 2019-02-14 19:19:53 -0800
Engine • revision 3757390fa4
Tools • Dart 2.1.2 (build 2.1.2-dev.0.0 0a7dcf17eb)
I tried to install the 2.2.0 version independently and I succeed :
dart --version
Dart VM version: 2.2.0 (Tue Feb 26 15:04:32 2019 +0100) on "macos_x64"
However, Flutter doesn't use this version as you can see above. I tried to replace files of the dart-sdk used by flutter (flutter/bin/cache/dart-sdk) by the version that I installed independently, but when I try to run Flutter after that I have a snapshot problem so I have put back the original dart-sdk folder in the flutter directory.
Do you have any ideas how can I update it?
PS: I downloaded flutter very recently (10 days ago) from here: https://flutter.dev/docs/get-started/install/macos
It might be due to the fact you are on channel stable which is the most secure builds of the four channels to get updated (channels are listed here)
If you are a bit more curious to try out the new features without having to risk bad builds I advocate channel beta:
Every month, we pick the "best" dev build of the previous month or so, and promote it to beta. These builds have been tested with our codelabs.
where the stable channel has this description:
When we believe we have a particularly good build, we promote it to the stable channel. We intend to do this more or less every quarter, but this may vary. We recommend that you use this channel for all production app releases. We may ship hotfixes to the stable channel for high-priority bugs, although our intent is to do this rarely.
You can change the channel to point at beta by running this command in your terminal:
flutter channel beta followed by flutter upgrade to ensure you have got the last release for this particular branch.
Let me know how this affect your situation.
You have to upgrade flutter from cli with flutter upgrade command. Then flutter will use latest version of Dart SDK. Flutter does not use your local Dart Sdk.
This issue is because of the dart version and by updating flutter the dart version won't update,
the way for solving this is,
first, you need to be on the dev or master channel,
flutter channel master
flutter upgrade
after that run flutter doctor -v as you see your dart is still an old one
in this step, you should update it manually, as the doc says Dart
for Windows user
choco upgrade dart-sdk
for Mac users
if you user brew to install dart
brew upgrade dart
and if you don't, you can install it
brew tap dart-lang/dart
brew install dart
wish this solves your issue.
You might need to Update your pubspec.yaml depending on the flutter channel you want to work on:
If you are on stable channel :
Go into pubspec.yaml and type in:
environment:
sdk: ">=2.2.0 <3.0.0"
(Whatever Dart SDK version you want comes in the front)
dependencies:
cupertino_icons: ^1.0.0
If you are on beta channel :
environment:
sdk: ">=2.12.0 <3.0.0"
dependencies:
cupertino_icons: ^1.0.1
Then if you are on stable channel (or beta), open the terminal in your IDE and enter
flutter channel stable
# or flutter channel beta
flutter upgrade
flutter pub get
Check the version with flutter --version
Hope it helps.
follow some command given below :
1.flutter version -> give all the flutter version list available.
2.flutter version v1.12.13+hotfix.7 -> you can switch to any given flutter version
in your console by 1st command.
Open terminal commands to Upgrade Flutter – Dart SDK
1-> C:\flutter
2->run command " flutter channel master "
3->run command after switching " flutter upgrade "
Now open android studio which automatically fetch updated sdk from flutter folder
You can upgrade dart SDK using terminal by typing flutter upgrade.
This will upgrade both flutter and dart SDK.
Actually flutter upgrade includes the Flutter and Dart SDK and doesn't install them separately.
if you using android studio,
Tools->Flutter->Flutter upgrade
click on flutter upgrade then you can install it
Try this
flutter channel stable
flutter upgrade
or this
flutter channel master
flutter upgrade
it is so simple if dart was installed with flutter just do the below line:
flutter upgrade
If using windows, you can use chocolatey to upgrade sdk by using command.
choco upgrade dart-sdk
If you want the latest pre-release version:
choco upgrade dart-sdk --pre
Yeah, the cause of the problem is inherent in the fact that Flutter does not use the dart present on your Local machine the Flutter sdk instead comes with the
latest compatible dart sdk shipped along with it.
When you run the command flutter version it prints the current flutter version and the current dart-sdk version shipped along with it. If you wish to use a later version of the dart sdk you'll have to upgrade your flutter sdk and if the specific dart-sdk version you want is not yet available for any branch in the stable channel I will suggest you switch to the master or dev channel and hopefully the latest release of those channels will support the required sdk constraint you need. But beware other branches aside the stable branch are not totally safe as you can encounter strange and unresolved errors so have that at the back of your mind.
I'm using flutter upgrade channel stable on macOS and it's working fine
The dark SDK that you updated is probably the one on your global dart installation.
Check your flutter dart path with the command
which flutter dart
If it is looking like this
[/path-to-flutter-sdk]/bin/flutter
/usr/local/bin/dart
you need to change it to use the one associated to flutter:
[/path-to-flutter-sdk]/bin/flutter
[/path-to-flutter-sdk]/bin/dart
To update it, you need to update your $PATH so [/path-to-flutter-sdk]/bin/flutter comes before /usr/local/bin.
I have two version of flutter SDK at the same time for two different flutter projects. I had changed the current SDK to 1.12 so it was complaining about dart SDK version. I changed the current version to 1.20 and the problem solved.
If you struggle to make any of these solutions work, you might have different versions of flutter on your system.
I checked my version on the command line and upgraded via 'flutter upgrade' to the latest stable release, which did not solve the problem in IntelliJ / Android Studio, as that pointed to another local version of flutter.
To check, run 'which flutter' on the command line and check with the version displayed in "Preferences --> Languages & Frameworks --> Flutter" and make sure they point at the same flutter installation.

Resources