Now in the last lesson, we installed Android Studio, and we installed the Flutter and Dart plugins. So if
you missed out on that,
be sure to head back to the last lesson to see how we now have this link on the Android Studio welcome
screen, which allows us to start a new Flutter project.
So once you're ready, go ahead and click on this to build your very first Flutter app.
So we're gonna choose a Flutter application, and click next. And you're gonna give your project a name.
Let's just call it testing_app and then make sure that the Flutter SDK path is listed here
as the one that matches what you have on your system.
So Android Studio is usually clever enough to pick up what the path is that you said in your path variable,
two lessons ago.
And if you haven't, then be sure to take a look at that video to see how we set this up.
Alternatively, you can also specify a path by clicking on these three dots and you can choose the location
where your Flutter SDK is located.
But either way, just be sure that it can get access to the Flutter package.
Now the project location is where this current project is going to be saved and it doesn't really matter
where you save it because we're going to delete it shortly anyways.
This is just for testing to see if we can get it all up and running and make sure that we've done all
the setup correctly.
So once you're ready, click on next, and you can leave the company domain as example.com and go ahead
and click finish to build your first Flutter app.
Now,
once that's done, you should see a file called main.dart open up in Android Studio, and this already
has some sample code that the Flutter team has written to be able to build a really simple counter app.
Now in order to run it on Android, we're going to need an emulator. And the way that we get an emulator
is by going to the AVD manager.
So it's the one right over here.
It's got the little Android icon and little phone icon combined.
And if you click on, it it should take you to setup a new virtual device.
Now in terms of performance, I recommend choosing a Nexus device.
So for example the Nexus 6 or the 6P.
Once you've chosen it, go ahead and click next.
And now you get to choose a operating system.
Now if you've already installed an operating system, then you should be able to simply selected and click
next.
But otherwise, simply click on the download button for the operating system of your choice and just let
it download and install.
Now, this might take about 5 to 10 minutes, but just be patient and it should be done soon.
Now once that's complete go ahead and click finish, and you can now choose that new operating system
that you downloaded and installed.
So now we can go ahead and click next. And here, you can give you AVD a name, or choose whether if you
want to have the device frame.
But most importantly, you're going to enable hardware acceleration by going under the emulated performance
dropdown list and switching your graphics from automatic to hardware accelerated.
And this is going to make your emulator run so much faster.
So this is why we chose a Nexus device rather than a pixel device.
So once you're done over here, go ahead and click finish, and you're now all done with setting up your
virtual device.
Now if you want to give it a go and see what it looks like, then go ahead and click on the play button
right here, and your chosen emulator should now launch. And here it is.
Here's our brand new emulated device.
So now I'm going to close down this window.
But remember you can always get back to it just by clicking on that icon over there which is your AVD
manager.
Now at this point, I want to test out this sample code that the Flutter team has created and I'm going
to test it onto my virtual device.
So over here is where you choose the device that you want to test it onto. A little bit later on, after
we create our first app, we're going to launch our app onto a physical device as well.
And I'll walk you through the steps that are required a little bit later on.
Now if you have more than one emulator device, you'll see them show up here, so select the one that you
want to build your app for, and then go ahead and click on the play button.
Now in order to see the progress of the running of your app, you'll see it inside your console down here
and you'll see the various stages that it's going through. And the part where initializes gradle
usually takes longest.
So, give it a few minutes and it should launch automatically onto the phone.
Now once it's done, the loading bar down here will disappear and you should see the Flutter demo app
show up on screen.
Now this is a really simple counter app.
As soon as you push the button then the counter goes up and that's pretty much all it does.
But if you've gotten this far, then congratulations, you have completed all of the steps in Windows setup
and you are now ready to start building Flutter apps for Android development.
Now in the coming lessons I'll be running most of the apps in the iOS simulator but it's effectively
the same if you're using the Android emulator.
Now if you're ready you can go ahead and delete this testing app, and head over to the start of the course
where we'll build our very first app.