I'm following the instructions to install flutter, it's my first install and I'm being careful not to miss a step. But...
Everything is going well until I try to run flutter doctor. I have updated the path and all is well.
I've edited the .bash_profile adding this line:
export PATH="$PATH:[PATH_TO_FLUTTER_GIT_DIRECTORY]/flutter/bin"
echo $PATH and which flutter are both correct.
Please see the screenshot attached.
Running on macOS Sierra, version 10.12.6 // Flutter version: flutter_macos_2.0.1-stable
Terminal: Flutter Doctor Crash
EDIT:
I've done what you suggested:
My Mac is running 64-bits OK.
I have installed brew OK
brew install dart with some errors
refresh and run flutter doctor -vwith crash
1)
2)
First, verified if the your mac is 64-bits, click here for know how.
In Mac the Flutter run only in architecture 64-bits;
If the your mac is the 64-bits try install the dart using the Brew;
After install brew, open the terminal and run the command:
brew install dart
Now run the flutter doctor;
So, I found a way around my issue.
As I cannot upgrade my Mac (for now), which I think was part of the problem, I tried to downgrade my Flutter version.
I installed 1.22.0-stable. Now flutter doctor runs OK-ish.
The only thing now is, having a mid-2010 MacOS 10.12.6 (Sierra), not being able to upgrade to (at least) Mojave, I cannot install Xcode 11, which is the minimum version allowed so I can compile on IOS.
Anyway, for now it seems to run fine: Android Studio - Flutter & Dart plugins - Android Simulator.
Although, working on a Mac and not being able to run/work on an IOS app is a bit frustrating, not gonna lie...
Related
I'm getting this warning after using "Flutter Doctor" command after the installation of Dart using brew tap dart-lang/dart on MacOS Big Sur
Flutter (Channel stable, 3.7.0, on macOS 11.7.2 20G1020 darwin-x64,
locale
en-GB)
! Warning: dart on your path resolves to
/usr/local/Cellar/dart/2.19.1/libexec/bin/dart, which is not inside your
current Flutter SDK checkout at /Users/puneet/development/flutter.
Consider adding /Users/puneet/development/flutter/bin to the front of your
path.
Can you anyone tell me how can i resolve this issue?
I'm trying avoid this warning and run a code on android studio developed on flutter framework.
I resolve this warning by just uninstalling the dart sdk using this command -
brew uninstall dart
Since dart sdk already comes with flutter installation, you need not to install it seperately.
Here is how I solve this problem
My dart path on environmental variable was look like (Both user and system variable)
C:\src\dart-sdk\bin
Now I change it to
C:\src\dart-sdk\bin\dart.exe
and the problem resolved.
The Flutter framework also contains Dart. So, if you already installed Dart separately on your OS, remove Dart and its Path from your system. You should have only one Path that is: /Users/puneet/development/flutter/bin
SOLVED
when you update your flutter to the latest version this warning comes in your flutter doctor output:-
for solving this just go and open .zshrc and after that check your flutter bin path is like this:-
change your path into this:-
and then run flutter doctor again... PROBLEM SOLVED ☺️
So I ran flutter doctor and it says that Android studio is missing.
I install Android Studio, run flutter doctor again, but it doesn't detect android studio and still displays the same message.
Why is flutter doctor not detecting it?
Is there a tool to fix the tool that fixes flutter? Like flutter doctor doctor for example?
try this: flutter doctor -vv
-v, --verbose Noisy logging, including all shell commands
executed.
If used with "--help", shows hidden options. If used
with "flutter doctor", shows additional diagnostic
information. (Use "-vv" to force verbose logging in
those cases.)
If you have installed Android Studio properly by following the steps listed in this doc, then just try to restart your Terminal or PC.
If it doesn't show after this, then there is no need to worry as still, you should be able to build and debug Flutter Android apps without the Android Studio being detected.
After installing AndroidStudio install tools and plugins, if you still face any issue, do a restart.
Also, you can follow install guide
Does it solve in your case?
After installing Android Studio, you have to install Flutter SDK and add it to the path in Windows environment variables, and also before all this, it is better to install JDK8 (not 11 not 16 just 8).
Once you have done all that I said, you can restart your terminal or CMD in windows and now run the flutter doctor
and for details on that you should run flutter doctor -v
Link for download flutter SDK : https://flutter.dev/docs/get-started/install
Link for download JDK 8 : https://www.oracle.com/java/technologies/javase/javase-jdk8-downloads.html
I just updated Flutter plugin to 53.0.1, restarted Android Studio and hit "run" button and the error below show up:
Could not find an option named "devtools-server-address".
Close and reopen AndroidStudio resolved for me!
killall java
I downgraded from Flutter 2.0 to Flutter 1.22.5 and got this error.
To solve it,
Go to your terminal and write flutter channel stable.
Then run flutter doctor.
Now you may get another error like this -
If you have Flutter & Dart plugins already install, just ignore this error. This is a bug in Flutter 1.22.5 .
Just run the app and it will work fine!
I had the same issue but using VS Code on stable channel
Execute the following commands:
flutter channel stable
flutter upgrade
flutter clean
flutter pub get
Then, close and open your IDE
Follow the steps:
File -> Invalidate Cache and Restart. Run flutter clean Worked For me.
This so simple... Open terminal type flutter channel dev this solve your problem.
And after that flutter upgrade
Finally, flutter doctor
If it does not help:
Open terminal type flutter channel stable
And after that flutter upgrade
Finally, flutter doctor
Working without upgrading flutter
Safe fix for Mac (Android Studio 4.1+). It is in a different directory now, but the symbolic link helps.
Just run this command in the Terminal:
ln -s ~/Library/Application\ Support/Google/AndroidStudio4.1/plugins ~/Library/Application\ Support/AndroidStudio4.1
Change the version of the Android studio depending on what you have, I had 4.2 so used.
ln -s ~/Library/Application\ Support/Google/AndroidStudio4.2/plugins ~/Library/Application\ Support/AndroidStudio4.2
Just Invalidate Cache and Restart. Worked for me.
Just close your all project and also close Android Studio and Reopen.
I am trying to run my code on AndroidStudio by using Flutter but when I run it shows an error:
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 11.
flutter doctor shows that all is fine, I looked around a lot and tried lots of things like uninstall it and install it again, and tried adding:
dev_dependencies:
build_runner: ^1.10.0
dependency_overrides:
analyzer: 0.39.14
and tried
flutter channel stable
flutter upgrade
and tried
flutter channel master
flutter upgrade
But nothing worked, note that when I write "which pod" it shows the path, that means it exists right? then what is the problem? please help :(
have you tried to run pod install from the ios folder?
The only thing that worked with me is using android emulator, ios simulator still show the same error
I had the same issue and I found a solution, but with still an answered question. See my question (and one partial solution) here
The partial solution is: in Android Studio, click on the tab "Terminal" at the bottom of the IDE and in this pane, type flutter run. It does the same as the button Run, and Android Studio stopped complaining about CocaPods.
To stop the app, type q in the same terminal.
flutter app was working getting build and run on Xcode 10 on device iOS 12 fine before,
The time dart upgrade 2.1.0 happen in Flutter build iOS worked well with command and on Xcode 10 after build get success while running Flutter app on iPhone 7 iOS 12, it started giving error and app gets crash with following error message in Xcode logs.
Error is Runner[410:28754] [VERBOSE-3:dart_vm.cc(403)] Error while initializing the Dart VM: Wrong full snapshot version, expected '8343f188ada07642f47c56e518f1307c' found '46b2bfb57b5647c5f7527ff9aa56c69b'
Here are the details of the flutter sdk and dart .
Flutter 0.11.9 • channel beta • https://github.com/flutter/flutter.git
Framework • revision d48e6e4
Engine • revision 5c8147450d
Tools • Dart 2.1.0 (build 2.1.0-dev.9.4 f9ebf21297)
I have experienced this error and none of the above solution worked for me infact the option of clearing the flutter/bin/cache messed the entire vscode IDE.
So I deleted the entire flutter SDK and installed fresh new SDK from flutter official website.
After this installation everything was working fine.
I had this issue after a flutter upgrade. Uninstalling the app from the device and then flutter running it again solved the problem.
After deleting the flutter/bin/cache and running flutter clean, I couldn't get the dart sdk to load until I launched the flutter console (flutter_console.bat) that can be found in the directory where you installed flutter and ran flutter doctor there. That solved the problem.
Do git clean -xffd in flutter installed directory(repo).
If it's a Flutter project first try flutter clean if did not work, try above git command.
If still not solved, delete everything inside /flutter/bin/cache and try.
If still not :D,
Do flutter channel master, flutter upgrade, and flutter clean. If nothing worked please add a comment below.
If you are in Dart environment out flutter/bin/cach/dart-sdk, you may be not upgraded dart-sdk. This happen to me Dart 2.5.0 with chololate installed. So I just did choco upgrade dart-sdk
I have exactly this problem i Solve it how ?
by these comments you just update flutter
flutter channel beta
,
flutter upgrade
you should upgrade your dart sdk
So try this command :
choco install dart-sdk
if this is not work for you download it from this link
https://dart.dev/tools/sdk/archive;
and replace it with your current dart-sdk in flutter
I also have experienced the same issue. I upgraded the flutter version and later downgraded and encounter this issue maily on IOS adhoc build.
Solution:
Delete out $FLUTTER_HOME/bin/cache and run flutter doctor.
This will solve.
What worked for me was changing channel and upgrading and then changing channel back and upgrading.
I had to remove the flutter SDK folder in my computer completely and redownload the latest one at https://flutter.dev/docs/get-started/install/macos
Then, I ran flutter doctor.
You can find where your flutter folder is by typing which flutter in your terminal.
You don't need to uninstall the whole flutter and set environment path or anything else.
Just downgrade to any version by doing the below commands, suppose my current flutter version is v3.3.8 and I come across this issue then:
Go to flutter sdk-path in the command prompt and checkout to any branch you would like to switch for a moment, like v2.5.0. So,
By doing this you changed your repository from v3.3.8 to v2.5.0
git checkout v2.5.0
You can check previous flutter versions from here
link
Downgrade your flutter version to 2.5.0
flutter downgrade v2.5.0
Then upgrade flutter
flutter upgrade