Installing Flutter On A Mac, and Running Your First Flutter App - Seth Ladd
Installing Flutter On A Mac, and Running Your First Flutter App - Seth Ladd
/ %&''&(
Acceder a Medium con
0>C?$>?
Google
E)/$+/3*/)4
jorge pino
[email protected]
)*+#',,-*.%/,0##"1%2*%'%3'45%'*(
10**-*.%6201%7-1+#%/,0##"1%'88
0)/1$2344 5)6$789$:;7< · 8$=>?$*)34
tldr: You can install Flutter on a new Mac, and run your first Flutter demo app,
in under 10 minutes (not counting download times :)
Flutter is a new way to rapidly build high-quality apps for iOS and Android.
If you’re new to mobile development, or looking for a faster way to build
apps, we recommend taking a look at Flutter.
Flutter’s Install guide has the complete instructions, if you are looking for
all the details. This post is not the official install guide, this is just my journey
installing on my new Mac. This post has the “short version” which worked
for me. This post assumes you have some knowledge of how to use Macs,
and assumes you are comfortable typing a few commands on the command
line.
!"#$#%"$&'(##")$*+,
Open a new terminal window
Congrats, you now have the Flutter SDK on your Mac! Next, you need to get
a platform (in this case, Android) SDK.
!"#$#%"$-./)01/$*+,
You need either Android Studio or Xcode to run your demo. We’ll choose
Android Studio just to get started, which gives you the Android SDK and the
Android Emulator. You can install Xcode later if you’d like.
Wait for Android Studio to download the Android SDK for you
Once you see the “Welcome to Android Studio” dialog, with “Start a new
Android Studio project”, go ahead and quit Android Studio
Go back to the Terminal (where you set your PATH), and type: flutter
doctor
If you see [✓] Android toolchain in the output, then you can move on!
For example:
If you don’t see [✓] Android toolchain, read the output for suggestions or
email [email protected].
2)"3#"$40()$51)6#$/"70$388
In the Terminal, type flutter create my_first_app
2)"3#"$3.$-./)01/$97('3#0)
Your first demo app will run inside an emulator.
Select the my_first_app directory, which flutter create created for you
Using the Android Studio menus, select Tools > Android > AVD
Manager
:(.$#%"$97('3#0)
Now that you have an emulator (also known as a Virtual Device), you need
to launch it.
Click the green arrow under “Actions” in the “Your Virtual Devices”
window
Once you see the Android desktop in the virtual device, go back to the
Terminal, ensure you are in the my_first_app directory, and type flutter
devices
If you see “Android SDK built for x86” in the list of devices, you are ready to
run your first app! If you do not see any devices listed, please email flutter-
[email protected]
-;;"8#$#%"$-./)01/$*+,$'1;".6"6
(apologies, because, yes, apparently we have to do this now :)
:(.$40()$/"70$388
With the emulator running a virtual Android device, you can now run your
app!
(Allow incoming network connections to the java process, if you see that
popup)
<3="$5(.$>1#%$&'(##")?
Some resources to get your started:
Step-by-step codelab
@:; 8
,?4*&>4 %'.//)*
@0)"$5)07$*"#%$A3// %&''&(
A*&4.6/$B3?3C)*$D$E&&C')$F&*$%.61+>39$3./1&*9$6&?F)*)?6)$&*C3?>G)*"$2&H)+
-34=>?/&?$3?4$-&3*4$C3=)+"
@0)"$&)07$@"/1(7