in this video we're going to be setting
up the Android SDK and the Android
studio IDE on a Windows 10 machine now
the reason I'm doing this is because I
just finished a course on react native
infrared onyx and I'm going to be doing
a YouTube crash course on it as well
and we're going to be using Windows and
you need to have this setup you also
need this obviously if you're doing any
Android Java development but you're also
going to need it if you want to use
Cordova or ionic which is another
JavaScript framework for building mobile
apps now I know there's a lot of
tutorials on this subject but things are
constantly changing and I also feel that
many of those videos are missing
information so I'm going to show you
start to finish how to set up the
Android software development kit alright
and we also want the Android virtual
device because that's what we'll use to
test our application our react native
application and so on alright so there's
a couple main steps so first you need to
have Java installed make sure you have
it you probably do if you don't just
search for Java download just get that
set up all right and we're going to
download Android studio from this page
here we're going to install it and then
we need to open up the SDK manager
install and install a bunch of other
stuff
all right including hexam which has to
do with the AVD acceleration the build
tools as well as a system image for the
virtual device okay we also have to edit
the path variable make it so that we can
run the SDK manager and some other stuff
through the command line we also want to
create an Android virtual device all
right so that's the plan you want to go
to developer.android.com slash studio
and just go ahead and download it I
already have it downloaded it is quite a
large file so it may take a while
alright so once you have that downloaded
just go ahead and open it up ok so we're
gonna go ahead and run that
okay so we're going to go through the
installer make sure you have the SDK and
the virtual device selected click Next
alright now these two locations are
important this is where our Android
studio is going to be installed this is
in your programs Program Files folder
and then this is the location of the SDK
and it's good to take note of this
directory okay by default at this point
it's going to be in your user folder and
then app data local Android and then SDK
okay that's the location of it so we're
going to click Next install and we'll
let that get set up alright guys so that
actually took quite a while even on a
pretty pretty hefty machine so now
that's completed we'll click Next and
let's click finish will keep the start
Android studio checked alright so you'll
probably see a screen like this we're
going to go ahead and click Next and
it's going to ask us the type of setup
we want we're going to choose standard
click Next and finish ok so now it's
going to go ahead and download all the
components alright guys so that actually
took a while too
I'm pausing the video so don't be
alarmed if yours is taking a hell of a
lot longer than mine is alright so let's
go ahead and click finish and you should
see a screen like this so you can choose
to start a new Android studio project
but we're not going to do that we're not
even going to use Android studio that's
more for Java development when you're
building native apps but what we want to
do is go into the SDK manager alright
you can go to it by going to this
configure and then SDK manager and of
course you can also get to it through
Android studio if you want so let's open
that up and you should see something
like this now with react native let me
just open up their documentation real
quick
okay let's say so with react native we
go to get started it's basically it
tells us how to do what we're doing the
Android development environment but
notice that we need to install Android 6
the SDK version 6.0 which is also known
as marshmallow alright if you don't plan
on using react native then you don't
have to do this you can just stick with
the latest version at this point it's
7.1.1 but we're going to be working with
react native so I want to make sure that
I check off Android 6.0 as well okay and
you can have multiple versions of the
SDK ok the next thing I want to do is go
to SDK tools and you want to make sure
that you have let's see a couple things
this right here Intel emulator
accelerator our hack some haxm installer
you want to make sure that that's
checked off ok if you want to use the
virtual device we want the platform
tools now the SDK tools for the latest
version is twenty five point two point
four and yours will probably be
different depending on when you're
watching this but we also want to make
sure we install the build tools for
marshmallow for Android six alright so
we're going to do that after okay we're
going to launch the standalone SDK
manager after because that gives us some
extra options but for now I think that
we're all set to go ahead and install
what we checked off let me just double
check yeah so that should be good so
let's go ahead and click apply click OK
we're going to accept the agreement and
click Next alright and the SDK version
six is actually revision 23
but like I said if you're not if you
don't plan on using react native then
don't worry about installing the the
version six of the SDK just go with the
latest okay so that's all set let's
click finish and now I'm going to open
up the the standalone SDK manager
so click that and then it should open a
window like this and notice that we have
other options now so we want to if you
installed version six you want to
install the build tools for that I
remember I said there that's revision 23
so we want to make sure we want these 23
dot zero dot one two and three so I'm
going to check those off okay and then
we're going to go down and we need to
also install a system image for the
virtual device now for the latest
version seven point one point one you
can see that those are checked off but
for a 6.0 we're going to go down and we
just want to check the Intel 86 atom
image okay if you have 64-bit make sure
you choose the 64-bit version alright
and then that's all we need we don't
need that other stuff and let's see I
think that should be good okay so we get
the build tools we have the system image
and I think we should be good to go so
let's go ahead and click install and
accept this install
alright guys so that took about five
minutes or so now we should be all set
as far as installing our extra packages
so let's close that up now next thing we
want to look at is the path variables
alright so we're going to open up the
control panel one second I just need to
do this off on a different monitor all
right so we want to go to system and
security and then we want to go to
system advanced system settings and you
should get this box and you want to just
open up this environment variables
button all right now we want to edit the
path variable for under user variables
and we're going to click Edit and notice
that it's already here okay now I notice
sometimes it's not sometimes you have to
add it all right so that you what you
want to do if you don't see these two
things right here you need to add them
yourself all right so it should be in
your user folder and then AppData local
Android SDK platform tools and then also
in the same SDK folder just tools if you
don't have these go ahead and click new
and then just add that in there add that
path both of those platform tools and
tools all right and then just save it
you also want to add right here if you
don't have it the system variables I'm
not sure if these are here because I've
already had them before or if it's just
automatically added so just to make sure
if you don't see these add them yourself
all right so we have the variable
Android underscore home which is going
to get set to the location of the SDK
all right if you don't have it click new
and then just put you know Android home
underscore home here and then the path
here alright and then just to be safe
you also want to add this Android SDK
home and then put that same path okay if
you don't have the Java home you also
want to add that and that's the location
of your wherever your
Java installation is alright so if we
look in my Program Files folder and I
think I have a couple versions of Java
but let's see Program Files and Java ok
yeah so you notice I have a bunch of
folders here but I'm using the JDK 1.8
point 0 underscore 1 1 1 ok so it's
pointing to this folder here you just
want to make sure you have your Java
home system variable and then that
should be good ok as far as paths and
notice if you look at the react native
documentation it tells you to do that
Android home as well gives you the in
same instructions I I just gave you so
now that we've done that we should be
able to use our Android command in the
command line all right so let's close
all these out and I'm going to open up
just a standard Windows command line and
let's see what happens if we say Android
ok so that that actually opens up the
SDK manager alright now we want to open
the AVD manager which is the Android
virtual device manager because we want
to create an emulator or a virtual
device so we should be able to say
Android ABD and that opens up this
window here now you can also get to this
window through Android studio just for
if for some reason the Android command
isn't working for you you can go to
Android studio and you can open it from
there so we want to create a virtual
device alright so we can give it a name
we'll just say Android device and we can
choose an actual device I'm going to use
the latest which is the Nexus 6 for a
target now if you're using react native
remember you want to use Android 6.0 any
SDKs you have installed will show up
right here and then for the CPU we want
to use that system image that we
installed can I remember
intel atom 64 if we didn't install that
we wouldn't have an option here we
wouldn't be able to set this up now as
far as the skin we're just going to
choose this skin with dynamic Hardware
controls by default oops what I do by
default it's telling me it's it's
filling in 307 to for the memory that's
way too high you can see down here we're
getting a warning it says on Windows
emulating RAM greater than 768 Meg's may
fail all right so I'm going to change
this to 750 and notice that that goes
away all right and we should be all set
so let's click OK and that should go
ahead and create the device for us we'll
click OK again and there we go so now
what I'm going to do is just highlight
it click start I'm going to choose to
scale the display to the real size and
click launch and that should open up the
emulator for us and then we should be
ready to develop react native
applications all right so it opened on
another screen let me just bring it down
[Music]
close this out
and hopefully this works okay so looks
like everything's good we get this
little welcome message
let's click got it now this is going to
be much much slower than a real device
so just keep that in mind it can get
kind of frustrating but it's a really
nice tool to be able to see how your
application would run all right and we
have camera I'm not sure if I set the
camera to actually work let's just see
what happens if we click that all right
so cannot connect to camera I believe in
in the settings of the virtual device we
could have chose to use a webcam so you
may want to do that go back and just
edit that if you need the camera and if
we click this right here this I guess
it's kind of a Settings button opens up
all these different options gallery
music the phone the messaging all that
stuff and it works just like a regular
Android device okay we click the home
button here that should close it up and
we're ready to start creating
applications all right so what I'm going
to do now is start on the react native
course now I do have an edge wanax
course that you probably want to check
out if you are interested in react
native the YouTube video YouTube course
will be will include a lot but obviously
I'm not going to go through all the
available components and all of that but
what we will do is get it set up get it
installed and running and then we'll
look at some of the important UI
components and and see how it works and
how we can get it running on the
emulator alright so hopefully this
helped you guys out whether you're using
react native or you need the SDK for
some other reason hopefully you were
able to get it set up if not leave leave
a comment if I can't help you out
someone else will please subscribe give
it a like give it a dislike if you
didn't like it and thanks for watching