so in this video we're going to set up the android sdk for the terminal so that
we can access the via command-line interface this is actually for linux
users the last two videos prior to this one were for windows and mac users so if
you're running one of those operating systems don't bother watching this video
but instead go back and watch the appropriate video for your operating
system that's because the instructions to get this to work are different for
each operating system but if you're running linux you're in the right place
and do watch this video as i go through now and show you how to set up
the path now we're going to be talking about setting up the computer to access
things like the sql lite command-line interface so that we can enter the
sql lite commands on the computer or on your computer and this will also allow
us to use the Android debug bridge or ADB and we'll be using that later in the
course and just out of interest you may have noticed that when you run your apps
from android studio you sometimes see a brief message saying waiting for ADB
well that comes up as Android studio starts the ADB server on your machine
and checks that there's a physical device or emulator that it can connect
to now the ADB the Android debug bridge is extremely useful for managing
android devices and is the way that Android studio installs and runs
your apps now because android studio knows where the android sdk is installed
on your machine because it actually install it when you were first installed
android studio you can use tools like the sql lite command-line interface
and aDb with no problems but for us to use them directly
we have to actually add the Android SDKs platform tools directory to our
computer paths manually so letes actually see how to do that so the first step we
want to do is check to see if the paths already set up so i've got android
studio opened and you can either be open on the welcome screen or you can open a
project that perhaps you've worked on in the previous section in which case you
want to click on the file menu and select project structure and make sure
you click on sdk location if your on the welcome screen just click on configure
and going to sdk manager both of those methods should take you to the same
screen and what were looking for is this android sdk location so that's the
location on my computer
where the android software development kit was installed by Android studio so
I'm actually going to select that path i'm going to copy it because we're going
to need a little bit later so I'm just going to do a ctrl C to copy that
because so going to paste and make a change at that shortly
next is just going to come down and come up here rather and select terminal
i'm actually gonna type in the commands sql lite 3 and you can
see it says sql lite three is currently not installed you can install
it by typing and that gives us the command to install up but we don't want
to do that because sql lite 3 is actually in the android studio folder so
instead what we're going to do is we're going to change the path to point to
that folder if you got a message there and come up and said sql lite 3
and perhaps a version number and was asking for some input what that means
is it's already set up on your system
you don't need to do the steps that I'm about to go through assuming that that's
not the case and that you have got the same error that I got on the screen
or one that similar saying that it's not installed then what we can do is
continue on and add that path now the user path on Ubuntu linux is set by
adding a command to the file .profile and if you're using a different linux
distro and check to see which file you already have and bearing in
mind maybe called bash_profile and if you have both been then used .profile
in all cases the file will be in your home directory I've got a
terminal session already opened so in there we want to type in gedit...
....because
i'm running ubuntu linux and you can see that it says in the comments there's
this file is executed by the command interpreter for login shells so what
we're going to do is go right down to the end of the file very last line we're
going to type an extra command to the file they're we type...
....
....next I'm going to paste in the Android SDK location that i took a copy
of from Android studio by doing a ctrl v
this is the path that's been added there making sure you don't add any
extra spaces which can cause problems then the other thing we need to
do is we need to put up / again after that then need to type...
....making sure you keep it in lower case then put a double quote into finish
that line off that's what we need to do their so i'm going to save the changes and
we can close the file at that point normally for those changes to take
effect would have to close down would have to logout rather log back in again
alternative to doing that is we can type...
....and bearing in mind for other distros that might be bash_profile
or even another name but for ubuntu its .profile going to do that and
that has reread that in and the only other thing i really need to do now is
type in sql lite 3 so....and this time you can see instead of
getting an error
we've actually got the sql lite command-line interface popping up giving
us a version number and it's actually actually giving us some tips to get help
etc so that means that we type obviously the right path and sql lite
is now ready to be used in which we going to be starting using it in the
next video I'm going to type .quit to get out of that now and for the other
command that we're going to be using later in the course that's ADB Android
debug bridge we can just type in ADB and you can see that we've got a whole heap of
mumbo-jumbo there but the bottom line is it's telling us that ADB is actually
working and it's found it and were able to use that and later in the course we
are putting that to good use
so the bottom line now is at this point we're actually done we've got the command
lines set up and we're ready to move on and start working with sql lite in
the next video I'll see you in the next video