WEBVTT

00:00.000 --> 00:04.100
All right, so before we start installing a
bunch of software, I want to show you how

00:04.100 --> 00:09.240
the main pieces actually fit together. So
the FTC setup can get confusing because

00:09.240 --> 00:14.980
you'll hear different terms like Android
Studio, the FTC SDK, Gradle, Java, and

00:14.980 --> 00:21.320
ADB. And it can sound like they're all the
same sort of thing. They're not, and you

00:21.320 --> 00:24.720
don't need to memorize this right now. I
just want the names to have somewhere to

00:24.720 --> 00:31.860
go in your head. So just to switch over to
a sort of flow diagram, the main program

00:31.860 --> 00:38.100
you're going to open is Android Studio. So
that's basically our workspace. It gives

00:38.100 --> 00:43.180
us the editor, the settings, and buttons
we use to control the rest of the process.

00:43.960 --> 00:49.820
Inside Android Studio, we open an FTC SDK
project. That project already has the

00:49.820 --> 00:55.500
structure and most libraries we need. Most
of the code that we write as a team goes

00:55.500 --> 01:01.460
in the TeamCode part of the project. When
we tell the project to build, Gradle

01:01.460 --> 01:06.020
manages that job. It reads the project
configuration and handles the different

01:06.020 --> 01:10.680
modules and dependencies. It runs the
steps needed to turn the project into an

01:10.680 --> 01:19.760
app. Gradle also needs Java in order to
run, so it uses a JDK. Android Studio

01:19.760 --> 01:25.780
includes a Java runtime for this. We'll
deal with the exact settings later. For

01:25.780 --> 01:31.800
now, just think of the JDK as the thing
that lets Gradle do its job. And Gradle

01:31.800 --> 01:36.820
then uses the Android SDK and its build
tools to compile and package everything

01:36.820 --> 01:42.020
for the Control Hub. The result that we
care about is the Robot Controller app

01:42.020 --> 01:47.680
package, usually called an APK. So the
rough path is our code is in the FTC

01:47.680 --> 01:53.840
project, and Gradle organizes the build.
The Android tools package it, and we end

01:53.840 --> 02:00.020
up with an app that can eventually run on
the Robot Controller. ADB is a separate

02:00.020 --> 02:06.040
part of the process. It is a tool for
communicating with Android devices, and we

02:06.040 --> 02:10.700
can use it to see available devices,
install an app, and get logs when

02:10.700 --> 02:16.220
something goes wrong. A successful build
does not automatically mean ADB can see a

02:16.220 --> 02:21.100
Control Hub, and an ADB connection does
not mean the robot code actually works.

02:21.380 --> 02:27.400
They're separate things, and we'll handle
them separately later. So this separation

02:27.400 --> 02:34.600
matters most when something breaks. If
Android Studio will not open, changing

02:34.600 --> 02:40.860
TeamCode won't help. If the project will
not build, we look at the code, Gradle,

02:41.220 --> 02:48.420
the JDK, or even the Android tools before
blaming the connection. If the build works

02:48.420 --> 02:53.100
but no device appears, that points us
toward ADB or the network. And if the app

02:53.100 --> 02:58.500
installs, but the robot behaves completely
incorrectly, then we're into robot

02:58.500 --> 03:05.960
configuration and stuff like the wiring
and hardware. So try to find the first

03:05.960 --> 03:09.900
part that failed instead of changing five
different things at once. That's really

03:09.900 --> 03:14.800
all this sort of flow is for. You can come
back to it later if you need to reference

03:14.800 --> 03:20.460
it and when one of these names appears in
an error. Next, we're going to install

03:20.460 --> 03:24.740
Android Studio and make sure the basic
Android SDK tools are actually there.

03:25.040 --> 03:31.740
We're not touching the robot just yet.
We're just getting your computer ready for

03:31.740 --> 03:33.560
all of the software.
