Open nelsonic opened 4 years ago
Still getting:
[!] Connected device
! No devices available
flutter config --android-sdk /path/to/android/sdk
Had to go searching for these two paths ... https://stackoverflow.com/questions/34532063/finding-android-sdk-on-mac-and-adding-to-path In my case (on Mac)
flutter config --android-sdk ~/Library/Android/sdk
Still getting
[!] Connected device
! No devices available
Ran:
flutter config --enable-web
Got:
Setting "enable-web" value to "true".
You may need to restart any open editors for them to read new settings.
Restarting my computer ...
-bash: flutter: command not found
https://stackoverflow.com/questions/46423088/flutter-run-command-not-working/49727202
export PATH=~/code/flutter/bin:$PATH;
Eventually ... after following: https://developer.android.com/studio/debug/dev-options#enable
[✓] Connected device (1 available)
• Pixel 3 • 89HX09YMG • android-arm64 • Android 10 (API 29)
• No issues found!
@nelsonic Have you been able to come to any conclusions regarding the installation of the flutter on the Mac?
@miguelmartins17 as per my comments above, I eventually figured out how to install everything and add my Android device. Did you install flutter on the MacBook Air? And if you did where did you document all the steps involved?
@nelsonic Since I've been working on putting the app on Google Play Store, I haven't installed Flutter on Mac yet. I started working on the TodoList on Flutter. And I've taken it all out documented when I get to some important point.
Did anyone have problems opening Visual Studio Code ? If so, what was the solution?
@miguelmartins17 I posted the solution to that yesterday (see above)
Open Settings > Security
Then click on "Open Anyway"
Am I Doing Something Wrong ?
@nelsonic I don't see a PR open for this but wanted to triple-check. Are you already putting this into a readme or shall I do it as I go?
@iteles I'm very happy for someone else
do the documentation for a change ... 🤔
Especially someone who recently received a Mac and is learning to develop cross-platform apps ... 😉
This should be documented the "installation of Flutter on Mac" is much more complex than windows just run Android Studio and install it from there. 😆
@miguelmartins17 sounds like you have a perfect opportunity to learn how to use vi
/ vim
on mac to edit your ~/.bash_profile
file 😉 https://github.com/dwyl/learn-vim
e.g:
vi ~/.bash_profile
The reason for having multiple code editors on your computer is so that you can quickly switch between them if you have multiple projects open in different programming languages.
The reason for learning vi
/ vim
is that it's the editor that comes with Linux/Unix and therefore if you are doing "server" or embedded systems work, you can always expect it to be available.
I ran that command and it turned out this was supposed to be Flutter's path.
@nelsonic You're right, all the information is welcome the more you learn the better.
Rather than using Visual Studio Code, I'm using Android Studio (for now because it gives more info)
However there isn't an easy way to open
https://stackoverflow.com/questions/35363546/open-androidstudio-project-from-command-line-on-osx
Thanks to @gradyplayer and @PKeno we can add a simple shortcut to open Android Studio.
Edit your ~/.bash_profile
file:
vi ~/.bash_profile
Once the file is open, add the following lines:
alias androidstudio="open -a /Applications/Android\ Studio.app"
alias as="open -a /Applications/Android\ Studio.app"
Save the file (press the Esc
key and type :wq
then hit the Enter
key)
Restart your terminal/iTerm. Now when you re-open Terminal/iTerm, you can type:
androidstudio .
That "full stop" means open the current directory (whichever directory you are in) in Android Studio. Obviously I'm using the shorter version:
as .
@nelsonic I think I've made it even with the phone connected, no more errors.
Trying to install Flutter on MacBook Pro got:
Retrying ...
XCode ... another 7.5Gb ... I'm _lucky enough to have decent (unlimited) bandwidth.
I fell sorry for people who are on slow/metered connections, they are basically blocked from iOS Dev. 🤦♂
Got it working on Mac:
Ha, I haven’t ever gotten a github mention for something I did on stackoverflow before, I am glad it helped
While attempting to download/install Flutter following the official instructions: https://flutter.dev/docs/get-started/install/macos
I also had to download:
[x] https://marketplace.visualstudio.com/items?itemName=Dart-Code.flutter![image](https://user-images.githubusercontent.com/194400/72173372-4bbac680-33cf-11ea-8eb9-32f10c5f2a8e.png)
[x] CocoaPods not installed. >
brew install cocoapods
“Visual Studio Code” can’t be opened because Apple cannot check it for malicious software.
see: https://github.com/microsoft/vscode/issues/74782 (open Settings > Security ... click on "Open Anyway")
![visual-studio-code-open-anyway](https://user-images.githubusercontent.com/194400/72206780-c8aa7680-3489-11ea-8071-eadef5a8aef9.png)
[!] Android Studio (version 3.5) ✗ Flutter plugin not installed; this adds Flutter specific functionality. ✗ Dart plugin not installed; this adds Dart specific functionality. https://stackoverflow.com/questions/51860845/flutter-plugin-not-installed-error-when-running-flutter-doctor
After installing everything we have the following:
https://stackoverflow.com/questions/49045393/flutter-run-no-connected-devices https://flutter.dev/docs/get-started/install/macos#set-up-the-android-emulator
Open Android Studio and locate the drop-down that says no devices:
Click on "Open AVD Manager" (Android Virtual Device)
![Screenshot 2020-01-10 at 17 45 29](https://user-images.githubusercontent.com/194400/72174258-2d55ca80-33d1-11ea-9340-049e724cd756.png)
You should see the following:![image](https://user-images.githubusercontent.com/194400/72174315-5e35ff80-33d1-11ea-8889-aaebabfdcba6.png)
Select the API version: (click the download button)![image](https://user-images.githubusercontent.com/194400/72174342-6beb8500-33d1-11ea-8aee-b262825d1b0b.png)
That will download Android Q which is another 1.1Gb![image](https://user-images.githubusercontent.com/194400/72174380-8b82ad80-33d1-11ea-9df5-03bfbbbec0de.png)