1
00:00:00,000 --> 00:00:02,700
?[treehouse presents]?
2
00:00:02,700 --> 00:00:05,700
[Quick Tips] [Getting Started with Android Development with Ben Jakuben]
3
00:00:05,700 --> 00:00:07,120
Hi, I'm Ben.
4
00:00:07,120 --> 00:00:08,430
In this Treehouse Quick Tip,
5
00:00:08,430 --> 00:00:11,430
we'll see how easy it is to get started with Android development.
6
00:00:11,430 --> 00:00:13,730
All the tools are free, so let's go.
7
00:00:13,730 --> 00:00:15,920
Now, by far the easiest way to get started
8
00:00:15,920 --> 00:00:18,510
is to download the free Android development bundle
9
00:00:18,510 --> 00:00:20,140
from the Treehouse website.
10
00:00:20,720 --> 00:00:22,950
The links for the bundle are available on the first free stage
11
00:00:22,950 --> 00:00:25,180
of Build an Android Crystal Ball app.
12
00:00:25,180 --> 00:00:28,950
The bundle is a simple zip file that contains everything you need to get started.
13
00:00:29,530 --> 00:00:33,470
All you need to do is unzip it, double click on the file called initial set-up,
14
00:00:33,470 --> 00:00:35,420
and then start development using Eclipse.
15
00:00:36,250 --> 00:00:38,220
But, let's also take a look at how to set it up manually.
16
00:00:38,810 --> 00:00:40,560
The first thing we need is Java.
17
00:00:40,560 --> 00:00:43,690
It might already be on your computer, but if not you can download it.
18
00:00:44,620 --> 00:00:46,570
On a Mac, if you don't already have Java,
19
00:00:46,570 --> 00:00:49,570
you'll be prompted to install it when you try to run Eclipse in a moment.
20
00:00:49,570 --> 00:00:52,060
If prompted, just click the install button.
21
00:00:52,060 --> 00:00:55,340
On Windows, you can download Java from Oracle's website.
22
00:00:55,340 --> 00:00:58,810
Search for JDK 6, click on the first link,
23
00:00:58,810 --> 00:01:01,410
and then download the JDK.
24
00:01:02,220 --> 00:01:06,070
Version 6 is currently supported for Android, so be sure to get that one.
25
00:01:06,070 --> 00:01:10,150
The update number changes frequently, but just make sure to download
26
00:01:10,150 --> 00:01:13,220
the JDK or Java SE 6.
27
00:01:14,300 --> 00:01:17,550
On the next screen, accept the license agreement
28
00:01:18,860 --> 00:01:21,500
and then select the download that matches your operating system.
29
00:01:22,200 --> 00:01:26,090
For Windows, you'll want either the 32-bit or the 64-bit versions down here.
30
00:01:27,070 --> 00:01:30,110
Now, let's get the Android SDK from the Android developer site.
31
00:01:30,790 --> 00:01:34,400
In a browser, open up developer.android.com
32
00:01:34,400 --> 00:01:38,610
and then click on the "Get the SDK" button down at the bottom.
33
00:01:39,710 --> 00:01:44,000
Click on the big download button which should auto detect your operating system.
34
00:01:44,000 --> 00:01:46,390
Unzip or install it once it's done.
35
00:01:48,130 --> 00:01:50,150
Next, we need Eclipse which is the recommended
36
00:01:50,150 --> 00:01:51,540
development tool for Android.
37
00:01:51,540 --> 00:01:58,240
Open up eclipse.org/downloads and then select the latest Eclipse classic version.
38
00:01:59,630 --> 00:02:01,620
Click on the link that matches your operating system
39
00:02:01,620 --> 00:02:03,780
and then download here at the top.
40
00:02:04,740 --> 00:02:06,890
Again, unzip this one once it's finished.
41
00:02:07,810 --> 00:02:09,789
Once Eclipse is unzipped, open it up.
42
00:02:12,370 --> 00:02:15,130
If you're prompted to open the application from the internet,
43
00:02:15,130 --> 00:02:16,260
just click open.
44
00:02:17,450 --> 00:02:20,570
When you first launch Eclipse, you'll be prompted to set your workspace.
45
00:02:20,570 --> 00:02:23,650
Go ahead and select the default or browse to a new one if you want,
46
00:02:23,650 --> 00:02:26,090
check the box that says "Use this as the default,"
47
00:02:26,090 --> 00:02:27,240
and click "OK."
48
00:02:29,530 --> 00:02:31,250
Okay, let's close this welcome screen,
49
00:02:32,470 --> 00:02:36,490
and the first thing we need to do is install the Android Developer Tools plugin,
50
00:02:36,490 --> 00:02:38,760
or the ADT plugin for short.
51
00:02:39,550 --> 00:02:43,870
In the Eclipse menu at the top, select "Help," "Install New Software,"
52
00:02:43,870 --> 00:02:47,950
click on the "Add" button over here on the right,
53
00:02:47,950 --> 00:02:52,240
type "ADT plugin" for the name,
54
00:02:52,240 --> 00:02:56,440
and then we're going to get the URL from the Android Developer site.
55
00:02:58,370 --> 00:03:01,200
You can find the URL by searching for ADT plugin
56
00:03:01,200 --> 00:03:04,290
and then clicking on the link that says "Installing the Eclipse Plugin."
57
00:03:05,870 --> 00:03:10,010
Scroll down just a little bit and copy this URL from the page.
58
00:03:10,010 --> 00:03:15,740
Back in Eclipse, we can paste this as the location and click "OK."
59
00:03:15,740 --> 00:03:18,130
If you're behind a firewall or a proxy,
60
00:03:18,130 --> 00:03:21,100
you might need to do some additional configuration in Eclipse
61
00:03:21,100 --> 00:03:23,260
to be able to get the ADT plugin.
62
00:03:23,840 --> 00:03:27,950
Okay, once this list is populated, select the developer tools,
63
00:03:29,550 --> 00:03:30,980
click "Next,"
64
00:03:33,150 --> 00:03:34,580
click "Next" again for this list,
65
00:03:36,170 --> 00:03:38,880
accept the terms of the license agreements, and click "Finish."
66
00:03:40,250 --> 00:03:43,060
During the installation, if you're prompted with a security warning,
67
00:03:43,060 --> 00:03:44,700
just click "OK."
68
00:03:44,700 --> 00:03:47,150
When it finishes, it will prompt you to restart Eclipse.
69
00:03:47,150 --> 00:03:48,320
Click "Yes."
70
00:03:50,940 --> 00:03:54,490
When Eclipse opens back up, it will prompt you to open the SDK Manager.
71
00:03:54,490 --> 00:03:56,030
Click on that button,
72
00:03:56,890 --> 00:04:00,000
and the SDK Manager is used to download other Android tools
73
00:04:00,000 --> 00:04:02,780
and versions of the SDK that we can use for development.
74
00:04:03,580 --> 00:04:05,540
You can download as much as you want from here,
75
00:04:05,540 --> 00:04:08,710
but to get started we want at least the following boxes checked:
76
00:04:08,710 --> 00:04:09,840
"Tools,"
77
00:04:09,840 --> 00:04:13,180
the "Android 4.1 SDK Platform,"
78
00:04:13,180 --> 00:04:15,180
and the "ARM System Image."
79
00:04:16,240 --> 00:04:18,860
Then click on "Install 4 Packages" down here on the right,
80
00:04:20,260 --> 00:04:23,040
click on the "Accept All" choice to accept the license agreements
81
00:04:23,040 --> 00:04:25,770
for all of the packages, and then click "Install."
82
00:04:31,340 --> 00:04:33,570
All right, once it's done click "OK,"
83
00:04:35,460 --> 00:04:37,880
and then we can close the Android SDK Manager.
84
00:04:38,570 --> 00:04:40,050
Now, just in case you're having any problems
85
00:04:40,050 --> 00:04:42,350
with setting the Android SDK location,
86
00:04:42,350 --> 00:04:43,940
in Eclipse I want to show you where it is.
87
00:04:43,940 --> 00:04:46,710
On Windows, select "Window Preferences,"
88
00:04:46,710 --> 00:04:50,160
or on a Mac, select "Eclipse Preferences."
89
00:04:51,600 --> 00:04:55,390
Click on Android, and then you can set your SDK location here at the top.
90
00:04:55,390 --> 00:04:57,720
Click "Apply" and then "OK" when you're done,
91
00:04:57,720 --> 00:05:00,110
but it should be taken care of automatically.
92
00:05:00,530 --> 00:05:03,060
Okay, lastly let's set up an emulator.
93
00:05:03,490 --> 00:05:06,580
Click on the "AVD Manager," which is up here at the top,
94
00:05:06,580 --> 00:05:07,900
next to the SDK Manager.
95
00:05:07,900 --> 00:05:09,840
The AVD Manager is the one on the right.
96
00:05:11,490 --> 00:05:13,560
Then, here in the window click on "New,"
97
00:05:14,500 --> 00:05:17,880
type in any name you want--I'll use Android 4.1--
98
00:05:18,460 --> 00:05:23,750
from the target, select the Android 4.1 SDK level that we just downloaded,
99
00:05:23,750 --> 00:05:26,260
and you can leave everything else as is,
100
00:05:26,260 --> 00:05:27,770
or you can customize it if you want.
101
00:05:27,770 --> 00:05:29,880
Click "Create AVD,"
102
00:05:31,450 --> 00:05:35,420
click on the emulator, and then click start to verify that everything is working correctly.
103
00:05:37,410 --> 00:05:39,310
This step might take a while, but as long as the
104
00:05:39,310 --> 00:05:42,220
Android logo is flashing here with the light sliding across it,
105
00:05:42,220 --> 00:05:45,780
then your emulator is loading, and you just have to wait it out.
106
00:05:47,700 --> 00:05:51,270
All right, if the emulator starts up, then you are ready to start coding.
107
00:05:52,060 --> 00:05:55,380
All right, you now have everything you need to start building apps.
108
00:05:55,380 --> 00:05:56,900
Good luck and happy coding.
109
00:05:56,900 --> 00:05:58,580
?[treehouse]?
110
00:05:58,580 --> 00:06:02,230
If you'd like to see more advanced videos and tutorials like this one,
111
00:06:02,230 --> 00:06:05,740
go to teamtreehouse.com and start learning for free. [www.TeamTreehouse.com]