All language subtitles for 10. Flutter Windows Setup

af Afrikaans
sq Albanian
am Amharic
ar Arabic Download
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bn Bengali
bs Bosnian
bg Bulgarian
ca Catalan
ceb Cebuano
ny Chichewa
zh-CN Chinese (Simplified)
zh-TW Chinese (Traditional)
co Corsican
hr Croatian
cs Czech
da Danish
nl Dutch
en English
eo Esperanto
et Estonian
tl Filipino
fi Finnish
fr French Download
fy Frisian
gl Galician
ka Georgian
de German
el Greek
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian
is Icelandic
ig Igbo
id Indonesian
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
km Khmer
ko Korean
ku Kurdish (Kurmanji)
ky Kyrgyz
lo Lao
la Latin
lv Latvian
lt Lithuanian
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mn Mongolian
my Myanmar (Burmese)
ne Nepali
no Norwegian
ps Pashto
fa Persian
pl Polish
pt Portuguese
pa Punjabi
ro Romanian
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
st Sesotho
sn Shona
sd Sindhi
si Sinhala
sk Slovak
sl Slovenian
so Somali
es Spanish
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
te Telugu
th Thai
tr Turkish
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu
or Odia (Oriya)
rw Kinyarwanda
tk Turkmen
tt Tatar
ug Uyghur
Would you like to inspect the original subtitles? These are the user uploaded subtitles that are being translated: 1 1 00:00:02,270 --> 00:00:05,070 So, now, we saw the installation steps 2 2 00:00:05,070 --> 00:00:06,530 for Mac OS. 3 3 00:00:06,530 --> 00:00:11,050 Let's now see how we can set up Flutter on Windows. 4 4 00:00:11,050 --> 00:00:13,780 Therefore, if you are not using Windows you can, 5 5 00:00:13,780 --> 00:00:16,360 of course, skip this video. 6 6 00:00:16,360 --> 00:00:19,223 Now, for Windows I'm again on flutter.dev, 7 7 00:00:20,210 --> 00:00:23,780 and their under the docs under Get started. 8 8 00:00:23,780 --> 00:00:25,780 We can choose Windows 9 9 00:00:25,780 --> 00:00:29,410 and there we find the detailed setup instructions. 10 10 00:00:29,410 --> 00:00:31,150 Now, I strongly recommend 11 11 00:00:31,150 --> 00:00:35,370 that you all to go through these written instructions here. 12 12 00:00:35,370 --> 00:00:37,770 I will go through the entire installation with you 13 13 00:00:37,770 --> 00:00:41,280 in this video, but since of course the setup process 14 14 00:00:41,280 --> 00:00:44,580 could change in one or two details over time, 15 15 00:00:44,580 --> 00:00:48,400 and also so that you have a well written guide 16 16 00:00:48,400 --> 00:00:52,370 those official instructions are a great place to go, 17 17 00:00:52,370 --> 00:00:54,600 especially if you're facing problems 18 18 00:00:54,600 --> 00:00:56,810 or if you're getting stuck. 19 19 00:00:56,810 --> 00:01:00,770 So, here we see the different Windows installation guides, 20 20 00:01:00,770 --> 00:01:02,960 and we start with the system requirements 21 21 00:01:02,960 --> 00:01:05,390 that you should fulfill here. 22 22 00:01:05,390 --> 00:01:08,660 Now, let's start with the tools that you need. 23 23 00:01:08,660 --> 00:01:11,740 Flutter, as you see, depends on two core tools 24 24 00:01:11,740 --> 00:01:13,780 that you should have installed 25 25 00:01:13,780 --> 00:01:16,180 in your Windows environment. 26 26 00:01:16,180 --> 00:01:18,570 For one, that's the Windows PowerShell, 27 27 00:01:18,570 --> 00:01:21,420 basically, a command prompt, a terminal, which allows you 28 28 00:01:21,420 --> 00:01:23,120 to run some commands on Windows, 29 29 00:01:23,120 --> 00:01:25,930 and it's already pre installed on Windows 10 30 30 00:01:25,930 --> 00:01:29,620 on older versions of Windows seven, and eight. 31 31 00:01:29,620 --> 00:01:32,250 You can install it, just as explained 32 32 00:01:32,250 --> 00:01:35,720 on this page, this link leads to. 33 33 00:01:35,720 --> 00:01:38,610 Now, once you've got the Windows PowerShell set up, 34 34 00:01:38,610 --> 00:01:41,890 I already do have it set up because I'm on Windows 10, 35 35 00:01:41,890 --> 00:01:43,743 we have to install Git. 36 36 00:01:44,925 --> 00:01:49,870 Now, Git four Windows is a version control tool, 37 37 00:01:49,870 --> 00:01:51,100 which means it allows you 38 38 00:01:51,100 --> 00:01:54,590 to manage source code, creates different snapshots 39 39 00:01:54,590 --> 00:01:57,620 of your source code and if you mess something up, 40 40 00:01:57,620 --> 00:02:01,040 you can go back to an older version of your code. 41 41 00:02:01,040 --> 00:02:04,470 Now, this is in general useful for a developer, 42 42 00:02:04,470 --> 00:02:06,680 but it's actually not a tool we're going to use 43 43 00:02:06,680 --> 00:02:08,050 throughout this course, 44 44 00:02:08,050 --> 00:02:11,000 because using it is totally optional, 45 45 00:02:11,000 --> 00:02:13,700 and there are dedicated Git resources 46 46 00:02:13,700 --> 00:02:15,380 if you wanna learn more about it, 47 47 00:02:15,380 --> 00:02:17,530 you can use it with Flutter. 48 48 00:02:17,530 --> 00:02:19,050 Nonetheless, though, even 49 49 00:02:19,050 --> 00:02:20,760 though we're not going to use it here, 50 50 00:02:20,760 --> 00:02:23,140 we need to install it because Flutter 51 51 00:02:23,140 --> 00:02:26,840 and the Flutter setup also needs it under the hood. 52 52 00:02:26,840 --> 00:02:30,310 So, here on this link, Git for Windows, 53 53 00:02:30,310 --> 00:02:33,130 you're taken to the page where you can download it 54 54 00:02:33,130 --> 00:02:36,730 and here, we wanna download Git for Windows 55 55 00:02:36,730 --> 00:02:38,500 which is a tool we can install, 56 56 00:02:38,500 --> 00:02:41,120 simply to the Downloads folder 57 57 00:02:41,120 --> 00:02:44,133 and now wait for this download to finish. 58 58 00:02:45,310 --> 00:02:47,150 Once the download finishes, 59 59 00:02:47,150 --> 00:02:51,260 we can just start this executable, start this installer, 60 60 00:02:51,260 --> 00:02:54,490 and this will open up this installer here 61 61 00:02:54,490 --> 00:02:57,340 and there we can simply walk through it. 62 62 00:02:57,340 --> 00:03:02,340 Now, here, first of all, the default options should be fine. 63 63 00:03:02,440 --> 00:03:05,193 So, you can just go with those as you see here. 64 64 00:03:06,330 --> 00:03:09,950 You can also stick to that default editor for Git 65 65 00:03:09,950 --> 00:03:12,570 whatever is chosen as a default for you her,. 66 66 00:03:12,570 --> 00:03:15,780 This is not too important right now. 67 67 00:03:15,780 --> 00:03:18,010 And now here, that's important. 68 68 00:03:18,010 --> 00:03:21,770 Here on this step we see in the Flutter documentation 69 69 00:03:21,770 --> 00:03:24,240 that we should choose the Use Git 70 70 00:03:24,240 --> 00:03:27,000 from the Windows command prompt option 71 71 00:03:27,000 --> 00:03:28,880 during the installation. 72 72 00:03:28,880 --> 00:03:30,610 Now, here in the installer, 73 73 00:03:30,610 --> 00:03:33,320 we see the Use Git from Git Bash only option 74 74 00:03:33,320 --> 00:03:34,440 which is not the one 75 75 00:03:35,480 --> 00:03:37,130 and we see the Git from the command line 76 76 00:03:37,130 --> 00:03:39,500 and also from 3rd-party software option, 77 77 00:03:39,500 --> 00:03:42,210 which is actually the option we want here 78 78 00:03:43,880 --> 00:03:46,310 and it's also the recommended option here, 79 79 00:03:46,310 --> 00:03:48,793 so it's the option with which we should go here. 80 80 00:03:51,020 --> 00:03:53,130 Let's click Next thereafter. 81 81 00:03:53,130 --> 00:03:55,680 We can keep the defaults here as well 82 82 00:03:55,680 --> 00:03:57,133 and click Next again. 83 83 00:03:58,200 --> 00:04:01,663 Again, keep the default here as well and, again, click Next. 84 84 00:04:02,640 --> 00:04:03,880 Click Next. 85 85 00:04:03,880 --> 00:04:06,393 Keep all the defaults basically, as you can tell. 86 86 00:04:07,963 --> 00:04:10,810 Also on this page, on this page, 87 87 00:04:10,810 --> 00:04:13,050 and finally we can click Install. 88 88 00:04:13,050 --> 00:04:15,050 So, the only important thing really was 89 89 00:04:15,050 --> 00:04:16,860 that Git from Windows command prompt 90 90 00:04:16,860 --> 00:04:20,170 which you should choose correctly, but there as you saw, 91 91 00:04:20,170 --> 00:04:22,560 we also went with the default 92 92 00:04:22,560 --> 00:04:26,300 and this will now install Git this tool 93 93 00:04:26,300 --> 00:04:28,430 which Flutter will use behind the scenes 94 94 00:04:28,430 --> 00:04:31,920 during installation on our system. 95 95 00:04:31,920 --> 00:04:34,773 So, let's wait for this installation to finish. 96 96 00:04:35,700 --> 00:04:37,970 And now, that this is finished, 97 97 00:04:37,970 --> 00:04:40,490 we don't have to view the release notes, 98 98 00:04:40,490 --> 00:04:42,110 we can click Next. 99 99 00:04:42,110 --> 00:04:43,830 Now, one thing you can do right away, 100 100 00:04:43,830 --> 00:04:46,257 is you can open up the Windows PowerShell 101 101 00:04:47,960 --> 00:04:51,930 and in there simply type git and if you type this you 102 102 00:04:51,930 --> 00:04:55,680 should see something like this, you should not see an error, 103 103 00:04:55,680 --> 00:04:57,450 that's the important thing and this means 104 104 00:04:57,450 --> 00:05:00,440 that Git was installed successfully. 105 105 00:05:00,440 --> 00:05:03,540 If it wasn't installed successfully try installing it again, 106 106 00:05:03,540 --> 00:05:06,350 and make sure you pick all the right settings. 107 107 00:05:06,350 --> 00:05:08,570 Also try restarting your system 108 108 00:05:08,570 --> 00:05:12,480 after you installed Git, this might also fix a few errors, 109 109 00:05:12,480 --> 00:05:14,690 where PowerShell doesn't recognize it, 110 110 00:05:14,690 --> 00:05:16,533 even though it's available already. 111 111 00:05:17,530 --> 00:05:18,830 Now, once that's done, 112 112 00:05:18,830 --> 00:05:21,280 we can finally get started with Flutter. 113 113 00:05:21,280 --> 00:05:23,620 So, now we can get the Flutter SDK 114 114 00:05:23,620 --> 00:05:26,450 and here we got a download link, which we again, 115 115 00:05:26,450 --> 00:05:29,860 simply click to download the Flutter SDK 116 116 00:05:29,860 --> 00:05:32,610 so the Flutter tool, basically. 117 117 00:05:32,610 --> 00:05:34,690 This will then be the tool which allows us 118 118 00:05:34,690 --> 00:05:36,490 to create Flutter projects, 119 119 00:05:36,490 --> 00:05:38,670 but also to build those projects 120 120 00:05:38,670 --> 00:05:42,780 and to turn our source code into native mobile apps. 121 121 00:05:42,780 --> 00:05:46,860 So, this is the core tool of this entire course in the end, 122 122 00:05:46,860 --> 00:05:49,300 after all, it is a Flutter course. 123 123 00:05:49,300 --> 00:05:52,113 So, let's wait for this download to finish. 124 124 00:05:53,090 --> 00:05:57,610 And once it's finished you can extract this zip file 125 125 00:05:57,610 --> 00:06:00,370 and now here's where you should pay close attention 126 126 00:06:00,370 --> 00:06:03,670 this zip file contains a flutter folder. 127 127 00:06:03,670 --> 00:06:08,150 Now, anywhere on your system in any path of your choice, 128 128 00:06:08,150 --> 00:06:10,630 for example, here in my case on D, 129 129 00:06:10,630 --> 00:06:14,450 and then a folder which I created which I named development, 130 130 00:06:14,450 --> 00:06:19,300 you should drag this Flutter folder into that path. 131 131 00:06:19,300 --> 00:06:21,560 So, any path on the system 132 132 00:06:21,560 --> 00:06:24,110 where you have read and write access to, 133 133 00:06:24,110 --> 00:06:27,090 so not a system exclusive part, 134 134 00:06:27,090 --> 00:06:29,760 not a path where Windows itself is installed, 135 135 00:06:29,760 --> 00:06:33,120 but somewhere on the desktop or, like in my case, 136 136 00:06:33,120 --> 00:06:34,830 on the D partition, and then, 137 137 00:06:34,830 --> 00:06:38,240 in a brand new development folder, which I have in there. 138 138 00:06:38,240 --> 00:06:41,150 You should drag that Zipped flutter folder 139 139 00:06:41,150 --> 00:06:44,740 into that new folder, and basically extract 140 140 00:06:44,740 --> 00:06:48,330 that file which that you just downloaded into that folder. 141 141 00:06:48,330 --> 00:06:52,020 Now, this can take a while to finish, and as a side note, 142 142 00:06:52,020 --> 00:06:54,760 the Barchart folder which you see here, 143 143 00:06:54,760 --> 00:06:56,290 you can totally ignore that. 144 144 00:06:56,290 --> 00:06:58,150 It has nothing to do with Flutter. 145 145 00:06:58,150 --> 00:07:00,480 That's just my development folder 146 146 00:07:00,480 --> 00:07:03,960 where I have various development tools and projects, 147 147 00:07:03,960 --> 00:07:05,740 and that's just another project 148 148 00:07:05,740 --> 00:07:08,210 totally unrelated to Flutter. 149 149 00:07:08,210 --> 00:07:11,530 So, let's wait for this extraction to finish. 150 150 00:07:11,530 --> 00:07:13,370 So, now the extraction finished, 151 151 00:07:13,370 --> 00:07:15,510 I'm going to get rid of that Barchart folder 152 152 00:07:15,510 --> 00:07:17,653 to make sure it's not confusing you, 153 153 00:07:18,630 --> 00:07:22,380 and with that we downloaded and stored the Flutter tool 154 154 00:07:22,380 --> 00:07:24,690 and now, in the flutter folder we 155 155 00:07:24,690 --> 00:07:27,750 also find a flutter_console.bat file 156 156 00:07:27,750 --> 00:07:29,460 and if we execute this, 157 157 00:07:29,460 --> 00:07:34,310 we actually open up a terminal here on Windows, 158 158 00:07:34,310 --> 00:07:37,050 where we can run Flutter commands. 159 159 00:07:37,050 --> 00:07:40,000 For example, you can type just Flutter in here, 160 160 00:07:40,000 --> 00:07:42,480 and you will get a list of all the commands you 161 161 00:07:42,480 --> 00:07:44,820 can run with the Flutter tool. 162 162 00:07:44,820 --> 00:07:48,720 The Flutter tool is now available here in that console, 163 163 00:07:48,720 --> 00:07:49,860 and we can, for example, 164 164 00:07:49,860 --> 00:07:53,030 use it to create new Flutter projects 165 165 00:07:53,030 --> 00:07:57,070 or also to run projects that we created, for example, 166 166 00:07:57,070 --> 00:08:01,430 to run them on a connected device and to test our app. 167 167 00:08:01,430 --> 00:08:03,300 We're not there yet though. 168 168 00:08:03,300 --> 00:08:06,540 Whilst it's nice that we have this executable 169 169 00:08:06,540 --> 00:08:08,660 that opens this terminal. 170 170 00:08:08,660 --> 00:08:10,310 It means that we can basically 171 171 00:08:10,310 --> 00:08:12,310 only run Flutter commands here, 172 172 00:08:12,310 --> 00:08:14,940 inside of that Flutter folder, 173 173 00:08:14,940 --> 00:08:17,210 after double clicking the file. 174 174 00:08:17,210 --> 00:08:20,510 In reality, we want to create Flutter projects, 175 175 00:08:20,510 --> 00:08:23,080 somewhere else on our system though. 176 176 00:08:23,080 --> 00:08:25,920 This here is just a tool, Flutter, 177 177 00:08:25,920 --> 00:08:30,420 our projects that use the tool should live somewhere else, 178 178 00:08:30,420 --> 00:08:34,900 just as you don't store all your Microsoft Word documents 179 179 00:08:34,900 --> 00:08:37,910 in the installation folder of Microsoft Word, 180 180 00:08:37,910 --> 00:08:39,910 but maybe in a Documents folder 181 181 00:08:39,910 --> 00:08:41,640 somewhere else on your system. 182 182 00:08:41,640 --> 00:08:43,730 It's the same with development and Flutter, 183 183 00:08:43,730 --> 00:08:46,440 we might have our tool here, our projects 184 184 00:08:46,440 --> 00:08:48,563 are probably stored somewhere else. 185 185 00:08:50,152 --> 00:08:52,180 And for that we can go back to the web page. 186 186 00:08:52,180 --> 00:08:56,300 We now completed the download and extraction step here 187 187 00:08:57,520 --> 00:09:01,160 and now we can move on to the Update your path step. 188 188 00:09:01,160 --> 00:09:02,780 Because right now we're only able 189 189 00:09:02,780 --> 00:09:06,250 to run the Flutter command after we double clicked 190 190 00:09:06,250 --> 00:09:08,940 on that flutter_console.bat file, 191 191 00:09:08,940 --> 00:09:10,430 and that's not what we want 192 192 00:09:10,430 --> 00:09:14,150 because this restricts our flexibility regarding 193 193 00:09:14,150 --> 00:09:16,710 where we can use that tool. 194 194 00:09:16,710 --> 00:09:18,910 So, therefore, let's now 195 195 00:09:18,910 --> 00:09:22,300 edit the environment variables on Windows. 196 196 00:09:22,300 --> 00:09:27,200 For that you can open up your start menu, search for env 197 197 00:09:27,200 --> 00:09:30,080 and you should get this Edit environment variables 198 198 00:09:30,080 --> 00:09:32,840 for your account setting here. 199 199 00:09:32,840 --> 00:09:35,810 Environment variables are basically global variables 200 200 00:09:35,810 --> 00:09:40,810 on your system, which configure various aspects of Windows. 201 201 00:09:41,400 --> 00:09:45,790 And, for example here, we can also configure which commands 202 202 00:09:45,790 --> 00:09:50,080 are available in the default command prompt or PowerShell. 203 203 00:09:50,080 --> 00:09:53,480 So, those interactive input environments 204 204 00:09:53,480 --> 00:09:55,550 which we have on Windows. 205 205 00:09:55,550 --> 00:09:59,490 And now, we wanna add our Flutter tool to such a variable 206 206 00:09:59,490 --> 00:10:01,980 to unlock it in the entire PowerShell 207 207 00:10:01,980 --> 00:10:04,790 and command prompt everywhere on the system, 208 208 00:10:04,790 --> 00:10:07,310 and not just after we launched 209 209 00:10:07,310 --> 00:10:09,763 this flutter_console.bat file. 210 210 00:10:10,840 --> 00:10:15,070 For that, here in the Environment Variables settings window, 211 211 00:10:15,070 --> 00:10:18,950 we should check under user variables here 212 212 00:10:18,950 --> 00:10:21,910 whether we have a Path variable. 213 213 00:10:21,910 --> 00:10:25,410 If you don't have it, as you see here in documentation, 214 214 00:10:25,410 --> 00:10:28,710 you should simply create a new variable named Path 215 215 00:10:28,710 --> 00:10:33,210 with the full path to the flutter\bin folder as a value. 216 216 00:10:33,210 --> 00:10:36,750 If you do have it already, as I do, you can double click 217 217 00:10:36,750 --> 00:10:40,960 on it and simply add a new entry here. 218 218 00:10:40,960 --> 00:10:43,040 Now, the entry we add here is the same 219 219 00:10:43,040 --> 00:10:46,350 as if we would create a new Path variable. 220 220 00:10:46,350 --> 00:10:50,240 We go back to the Flutter folder which we extracted before, 221 221 00:10:50,240 --> 00:10:53,300 and there into the bin folder, and now click 222 222 00:10:53,300 --> 00:10:57,820 into the path up there, into this path bar, 223 223 00:10:57,820 --> 00:11:00,370 so that you get a path written like this 224 224 00:11:00,370 --> 00:11:02,923 and copy this full path. 225 225 00:11:04,060 --> 00:11:06,050 Now, we'll go back to the environment variables 226 226 00:11:06,050 --> 00:11:08,980 and enter this path here into your new 227 227 00:11:08,980 --> 00:11:13,520 or existing Path variable and click OK thereafter 228 228 00:11:13,520 --> 00:11:15,500 and with that we can click OK again 229 229 00:11:15,500 --> 00:11:18,200 and now we set this variable. 230 230 00:11:18,200 --> 00:11:21,740 Now, make sure you close all existing PowerShell 231 231 00:11:21,740 --> 00:11:24,540 or Command Prompt Windows you might have open. 232 232 00:11:24,540 --> 00:11:25,720 I have none here. 233 233 00:11:25,720 --> 00:11:29,910 And there after we can, again, open PowerShell, 234 234 00:11:29,910 --> 00:11:34,440 or simply the default command prompt terminal here 235 235 00:11:34,440 --> 00:11:38,140 and in there, we should now be able to run Flutter 236 236 00:11:38,140 --> 00:11:40,760 and see a list of available commands 237 237 00:11:40,760 --> 00:11:43,510 which simply proves that everything worked 238 238 00:11:43,510 --> 00:11:46,570 and that we are ready to run the Flutter tool 239 239 00:11:46,570 --> 00:11:48,600 and now that's the default command prompt, 240 240 00:11:48,600 --> 00:11:51,610 we can run it anywhere on our system. 241 241 00:11:51,610 --> 00:11:55,893 We can now use that to create and run Flutter projects. 242 242 00:11:57,560 --> 00:12:00,030 Now, the first step we wanna do there after 243 243 00:12:00,030 --> 00:12:02,050 is we wanna run flutter doctor, 244 244 00:12:02,050 --> 00:12:04,950 which analyzes our entire system setup 245 245 00:12:04,950 --> 00:12:07,300 and tells us if something is missing. 246 246 00:12:07,300 --> 00:12:09,870 So, if I run flutter doctor here, 247 247 00:12:09,870 --> 00:12:11,610 it will now do that analysis, 248 248 00:12:11,610 --> 00:12:14,570 and it sees that Flutter was installed, 249 249 00:12:14,570 --> 00:12:17,489 but it sees that Android tools 250 250 00:12:17,489 --> 00:12:19,460 are missing that Android Studio is missing, 251 251 00:12:19,460 --> 00:12:21,510 and that we got no connected device 252 252 00:12:21,510 --> 00:12:24,430 on which we could test our Flutter app. 253 253 00:12:24,430 --> 00:12:27,100 Now, we'll need to install Android, 254 254 00:12:27,100 --> 00:12:30,960 to make sure that we can build Android apps with Flutter 255 255 00:12:30,960 --> 00:12:32,350 and will then also be able 256 256 00:12:32,350 --> 00:12:35,250 to spin up a virtual Android device 257 257 00:12:35,250 --> 00:12:37,440 which allows us to test Flutter apps 258 258 00:12:37,440 --> 00:12:40,210 and that of course will be another important step. 259 259 00:12:40,210 --> 00:12:42,300 So, let's continue with that. 260 260 00:12:42,300 --> 00:12:44,720 Unsurprisingly, it's also the next step here 261 261 00:12:44,720 --> 00:12:48,060 in the official documentation, the Android setup. 262 262 00:12:48,060 --> 00:12:50,260 And here the step is, the first step, 263 263 00:12:50,260 --> 00:12:53,830 is to download and install Android Studio. 264 264 00:12:53,830 --> 00:12:55,560 So, let's click that link so then we're taken 265 265 00:12:55,560 --> 00:12:57,370 to the Android Studio page 266 266 00:12:58,460 --> 00:13:01,880 and on that page download Android Studio. 267 267 00:13:01,880 --> 00:13:03,580 A gree to the license agreements here 268 268 00:13:03,580 --> 00:13:06,090 and download it for Windows. 269 269 00:13:06,090 --> 00:13:08,850 This will download an installer which we can execute 270 270 00:13:08,850 --> 00:13:12,580 to install the Android Studio tool on our system. 271 271 00:13:12,580 --> 00:13:15,070 The Android Studio tool is a tool 272 272 00:13:15,070 --> 00:13:17,820 that allows us to write Android code. 273 273 00:13:17,820 --> 00:13:19,670 That's not so important for us 274 274 00:13:19,670 --> 00:13:21,930 because we're going to write Flutter code, 275 275 00:13:21,930 --> 00:13:24,640 not Android, Flutter then, behind the scenes, 276 276 00:13:24,640 --> 00:13:28,810 can be transformed to Android code basically, automatically, 277 277 00:13:28,810 --> 00:13:30,220 but we'll write Flutter code. 278 278 00:13:30,220 --> 00:13:33,990 So, writing Android code is not our number one reason 279 279 00:13:33,990 --> 00:13:35,330 for downloading this. 280 280 00:13:35,330 --> 00:13:37,760 Instead, we download Android Studio 281 281 00:13:37,760 --> 00:13:41,120 because besides this editor to write code, 282 282 00:13:41,120 --> 00:13:43,920 it gives us all the tools you could say, 283 283 00:13:43,920 --> 00:13:47,070 which Flutter uses behind the scenes to generate 284 284 00:13:47,070 --> 00:13:49,850 and build Android apps to prepare them 285 285 00:13:49,850 --> 00:13:52,990 for publishing them to the Google Play Store, for example, 286 286 00:13:52,990 --> 00:13:56,010 all those essential Android built tools 287 287 00:13:56,010 --> 00:13:58,130 are part of Android Studio, 288 288 00:13:58,130 --> 00:14:01,440 which is why we need to download and install it. 289 289 00:14:01,440 --> 00:14:04,060 So, let's now wait for this download to finish 290 290 00:14:04,060 --> 00:14:06,670 before we can then continue with the installation 291 291 00:14:06,670 --> 00:14:08,950 and with setting up Android. 292 292 00:14:08,950 --> 00:14:10,780 So, now the download finished for me, 293 293 00:14:10,780 --> 00:14:12,710 I'm going to click on the downloaded file 294 294 00:14:12,710 --> 00:14:14,270 to open up that installer, 295 295 00:14:14,270 --> 00:14:16,770 which will now install Android Studio, 296 296 00:14:16,770 --> 00:14:18,360 and which will also allow us 297 297 00:14:18,360 --> 00:14:21,840 to install additional Android components, 298 298 00:14:21,840 --> 00:14:25,700 which we'll need to build Android apps with Flutter. 299 299 00:14:25,700 --> 00:14:28,150 So, let's walk through that installer. 300 300 00:14:28,150 --> 00:14:30,220 We wanna install Android Studio, 301 301 00:14:30,220 --> 00:14:32,770 and the Android virtual device here. 302 302 00:14:32,770 --> 00:14:34,580 This is a tool which will allow us 303 303 00:14:34,580 --> 00:14:38,320 to create virtual Android emulators later 304 304 00:14:38,320 --> 00:14:39,980 for testing the app. 305 305 00:14:39,980 --> 00:14:43,610 You can of course also test it on their real Android device, 306 306 00:14:43,610 --> 00:14:45,240 and I will show how that works 307 307 00:14:45,240 --> 00:14:46,860 throughout the course as well. 308 308 00:14:46,860 --> 00:14:49,020 But if you don't own such a device, 309 309 00:14:49,020 --> 00:14:51,460 and even if you do, you want to test it 310 310 00:14:51,460 --> 00:14:53,630 on multiple different devices, 311 311 00:14:53,630 --> 00:14:56,350 and with the Android virtual device tool, 312 312 00:14:56,350 --> 00:14:59,590 you can create different virtual Android phones 313 313 00:14:59,590 --> 00:15:02,800 to test your app on, so definitely install that. 314 314 00:15:02,800 --> 00:15:04,150 Click Next thereafter, 315 315 00:15:04,150 --> 00:15:06,920 and now choose the installation path. 316 316 00:15:06,920 --> 00:15:10,160 You can absolutely go with the default here. 317 317 00:15:10,160 --> 00:15:13,280 I will, however, choose a different folder 318 318 00:15:14,490 --> 00:15:16,640 and install this, in my example, 319 319 00:15:16,640 --> 00:15:19,620 on the D partition under Program Files 320 320 00:15:20,620 --> 00:15:23,440 and their under Android. 321 321 00:15:23,440 --> 00:15:25,460 Now, this path, of course is up to you. 322 322 00:15:25,460 --> 00:15:27,310 That's where I'm going to install it. 323 323 00:15:28,210 --> 00:15:31,140 Click Next thereafter and Install 324 324 00:15:31,140 --> 00:15:35,920 and this will now install Android Studio, on your system. 325 325 00:15:35,920 --> 00:15:38,340 So, let's wait for this to finish 326 326 00:15:39,440 --> 00:15:42,690 and with it finished let's click Next here. 327 327 00:15:42,690 --> 00:15:46,240 Now, thereafter, we can start Android Studio, 328 328 00:15:46,240 --> 00:15:48,130 so we can leave that checked, 329 329 00:15:48,130 --> 00:15:51,240 because now we'll continue inside of Android Studio. 330 330 00:15:51,240 --> 00:15:54,000 So, let's wait for this to start up 331 331 00:15:54,000 --> 00:15:55,650 and the first time you're opening this 332 332 00:15:55,650 --> 00:15:59,960 it should start up this configuration wizard here. 333 333 00:15:59,960 --> 00:16:01,960 Now, let's go through that. 334 334 00:16:01,960 --> 00:16:04,120 Let's click Next here, 335 335 00:16:04,120 --> 00:16:06,920 and then choose Custom here under settings 336 336 00:16:06,920 --> 00:16:09,710 so that we can configure everything. 337 337 00:16:09,710 --> 00:16:11,550 Let's click Next thereafter. 338 338 00:16:12,620 --> 00:16:15,800 Keep that default path for the Java Development Kit, 339 339 00:16:15,800 --> 00:16:18,050 which Android Studio needs. 340 340 00:16:18,050 --> 00:16:19,280 Click Next. 341 341 00:16:19,280 --> 00:16:23,020 Now, you can choose an appearance for Android Studio. 342 342 00:16:23,020 --> 00:16:23,960 It's totally up to you 343 343 00:16:23,960 --> 00:16:26,280 whether you want the light or dark theme. 344 344 00:16:26,280 --> 00:16:28,830 We're not going to write code in there anyways 345 345 00:16:28,830 --> 00:16:31,058 because I will use a different editor 346 346 00:16:31,058 --> 00:16:32,360 throughout the course and I'll show you 347 347 00:16:32,360 --> 00:16:35,200 how to set up that different editor later. 348 348 00:16:35,200 --> 00:16:37,330 So, you can choose whatever you want here. 349 349 00:16:37,330 --> 00:16:38,393 Click Next. 350 350 00:16:39,518 --> 00:16:40,660 And now, here, it's important. 351 351 00:16:40,660 --> 00:16:43,510 You wanna choose the Android SDK, 352 352 00:16:43,510 --> 00:16:46,490 and also the Android SDK Platform here, 353 353 00:16:46,490 --> 00:16:49,220 and there simply keep the default 354 354 00:16:49,220 --> 00:16:50,820 which it checked for you already. 355 355 00:16:50,820 --> 00:16:53,020 In my case that's API 30, 356 356 00:16:53,020 --> 00:16:55,730 but it might be a different version for you. 357 357 00:16:55,730 --> 00:17:00,430 If available, you also wanna install that HAXM, 358 358 00:17:00,430 --> 00:17:02,910 this Intel HAXM thing here, 359 359 00:17:02,910 --> 00:17:04,730 in my case it already is installed, 360 360 00:17:04,730 --> 00:17:06,870 which is why I can't check it. 361 361 00:17:06,870 --> 00:17:08,170 If you can check it, 362 362 00:17:08,170 --> 00:17:10,680 and it's not installed yet make sure you add it. 363 363 00:17:10,680 --> 00:17:12,660 If you don't have this option, 364 364 00:17:12,660 --> 00:17:15,790 don't worry, you can continue nonetheless. 365 365 00:17:15,790 --> 00:17:17,110 Also make sure you check 366 366 00:17:17,110 --> 00:17:19,360 this Android virtual device box here, 367 367 00:17:19,360 --> 00:17:21,840 so that you installed that as well. 368 368 00:17:21,840 --> 00:17:25,220 And then, choose a location for the Android SDK, 369 369 00:17:25,220 --> 00:17:28,480 and here I'm going to choose a different location, 370 370 00:17:28,480 --> 00:17:31,520 I'm going to add this in my development folder, 371 371 00:17:31,520 --> 00:17:33,520 next to the flutter folder 372 372 00:17:35,020 --> 00:17:37,070 and in there I'm going to create a new folder, 373 373 00:17:37,070 --> 00:17:39,890 which I'll name Android-sdk, 374 374 00:17:39,890 --> 00:17:42,400 make sure you pick a name without any white space 375 375 00:17:42,400 --> 00:17:45,120 in it here because that could cause problems 376 376 00:17:46,370 --> 00:17:48,190 and then, simply click Next. 377 377 00:17:48,190 --> 00:17:50,130 You can also keep the default here 378 378 00:17:50,130 --> 00:17:52,253 which would be on the C drive, though. 379 379 00:17:54,000 --> 00:17:57,630 With all those options let's click Next here. 380 380 00:17:57,630 --> 00:17:59,500 We can stick to these defaults here, 381 381 00:17:59,500 --> 00:18:01,310 you might not see this screen 382 382 00:18:01,310 --> 00:18:04,770 if you don't have this HAXM tool available. 383 383 00:18:04,770 --> 00:18:07,220 No problem in that case, no worries. 384 384 00:18:07,220 --> 00:18:11,370 Let's click Next and Finish and this will now download 385 385 00:18:11,370 --> 00:18:14,960 and install all those extra Android tools we need 386 386 00:18:14,960 --> 00:18:17,980 for building and testing Android apps 387 387 00:18:17,980 --> 00:18:20,820 and whilst we're not going to write Android code 388 388 00:18:20,820 --> 00:18:25,320 on our own, Flutter will use these tools, under the hood, 389 389 00:18:25,320 --> 00:18:29,530 to basically convert our Flutter code to Android code, 390 390 00:18:29,530 --> 00:18:33,600 you could say, to build that Android app based on our code. 391 391 00:18:33,600 --> 00:18:35,920 That's why we need to install all of that, 392 392 00:18:35,920 --> 00:18:38,370 and we need the Android virtual device tool 393 393 00:18:38,370 --> 00:18:41,040 which is also being installed to make sure 394 394 00:18:41,040 --> 00:18:45,370 that we can also test our app on virtual devices. 395 395 00:18:45,370 --> 00:18:47,340 Now, let's wait for all those downloads 396 396 00:18:47,340 --> 00:18:50,270 and this installation to finish now. 397 397 00:18:50,270 --> 00:18:52,530 As a side note, this installation process 398 398 00:18:52,530 --> 00:18:56,510 can really take a while, depending on your internet speed, 399 399 00:18:56,510 --> 00:18:59,760 the general hardware you're running on and in general, 400 400 00:18:59,760 --> 00:19:01,630 this really can take a couple of minutes, 401 401 00:19:01,630 --> 00:19:03,580 so don't worry if it seems like 402 402 00:19:03,580 --> 00:19:07,338 it gets stuck during installation, it isn't. 403 403 00:19:07,338 --> 00:19:10,830 Bnow, once this entire installation process finished, 404 404 00:19:10,830 --> 00:19:14,410 we can click Finish here and now we're ready 405 405 00:19:14,410 --> 00:19:17,230 to create a Flutter project. 406 406 00:19:17,230 --> 00:19:19,230 We actually could do that before as well 407 407 00:19:19,230 --> 00:19:22,010 but now we'll also be able to build this 408 408 00:19:22,010 --> 00:19:24,520 as an Android project then, 409 409 00:19:24,520 --> 00:19:29,050 and run it on a real or virtual Android device. 410 410 00:19:29,050 --> 00:19:31,330 Now, let's get started with that and for that, 411 411 00:19:31,330 --> 00:19:34,653 let's create a new Flutter project first of all. 412 412 00:19:35,490 --> 00:19:37,320 So, let's run flutter doctor again 413 413 00:19:37,320 --> 00:19:40,410 to verify whether everything is prepared now. 414 414 00:19:40,410 --> 00:19:43,930 And, at least, if you installed the Android SDK 415 415 00:19:43,930 --> 00:19:48,250 in a non-default directory, as I did it, 416 416 00:19:48,250 --> 00:19:49,520 you will see that Flutter 417 417 00:19:49,520 --> 00:19:52,880 is not able to locate the Android SDK. 418 418 00:19:52,880 --> 00:19:55,160 If you did go with the default path, 419 419 00:19:55,160 --> 00:19:57,770 you will not get this error, of course. 420 420 00:19:57,770 --> 00:19:59,470 The fix is simple, we'll need 421 421 00:19:59,470 --> 00:20:01,345 to add another environment variable 422 422 00:20:01,345 --> 00:20:04,373 which has this name ANDROID_SDK_ROOT. 423 423 00:20:05,810 --> 00:20:08,700 So, let's add it to the system environment variables again 424 424 00:20:08,700 --> 00:20:13,170 and then there environment variables and, now here, 425 425 00:20:13,170 --> 00:20:16,283 under your user environment variables click New. 426 426 00:20:17,230 --> 00:20:19,950 And choose ANDROID_SDK_ROOT as a name 427 427 00:20:19,950 --> 00:20:24,163 and now as a value the path to the Android SDK. 428 428 00:20:25,070 --> 00:20:27,640 So, for me, that's under D, development, 429 429 00:20:27,640 --> 00:20:29,770 and then here Android SDK. 430 430 00:20:29,770 --> 00:20:33,040 I'm going to grab this full path and insert it here 431 431 00:20:33,040 --> 00:20:36,630 as a value for the ANDROID_SDK_ROOT variable. 432 432 00:20:36,630 --> 00:20:41,360 Click OK and OK and restart the command prompt thereafter 433 433 00:20:42,537 --> 00:20:45,730 and in there, again, let's type flutter doctor 434 434 00:20:45,730 --> 00:20:48,760 and see whether this now works. 435 435 00:20:48,760 --> 00:20:51,470 And if we do so, you see that now at least 436 436 00:20:51,470 --> 00:20:53,020 it's one step further, 437 437 00:20:53,020 --> 00:20:56,370 it's checking the Android licenses but it might detect 438 438 00:20:56,370 --> 00:20:59,950 that not all licenses have been accepted yet. 439 439 00:20:59,950 --> 00:21:01,160 To resolve this, 440 440 00:21:01,160 --> 00:21:06,063 simply run flutter doctor --Android-licenses, 441 441 00:21:09,220 --> 00:21:13,850 just as it's saying here in this information output. 442 442 00:21:13,850 --> 00:21:17,180 Hit Enter, and now this will ask you 443 443 00:21:17,180 --> 00:21:19,500 whether you wanna review the licenses. 444 444 00:21:19,500 --> 00:21:22,930 I'll type y for yes here and thereafter you'll be prompted 445 445 00:21:22,930 --> 00:21:25,230 to accept the license multiple times, 446 446 00:21:25,230 --> 00:21:28,980 so I'll just type y and Enter for all those prompts 447 447 00:21:28,980 --> 00:21:33,980 until there are no more prompts left and once that is done, 448 448 00:21:34,200 --> 00:21:37,630 we can run flutter doctor one more time 449 449 00:21:38,550 --> 00:21:42,720 and now, you see, now this works, now the Android tool chain 450 450 00:21:42,720 --> 00:21:45,100 is configured correctly. 451 451 00:21:45,100 --> 00:21:46,770 Now, I'm still getting a warning here 452 452 00:21:46,770 --> 00:21:51,040 regarding the Android Studio setup, 453 453 00:21:51,040 --> 00:21:52,060 but we can ignore that 454 454 00:21:52,060 --> 00:21:54,540 because we're not going to use Android Studio 455 455 00:21:54,540 --> 00:21:56,700 to write Flutter code anyways 456 456 00:21:56,700 --> 00:22:00,250 and this warning is only related to us writing code 457 457 00:22:00,250 --> 00:22:01,710 in Android Studio. 458 458 00:22:01,710 --> 00:22:04,400 We'll use a different IDE for that and I'll show you 459 459 00:22:04,400 --> 00:22:07,160 how to set that up in the next lecture. 460 460 00:22:07,160 --> 00:22:09,770 So, we can ignore this output here 461 461 00:22:09,770 --> 00:22:11,730 and now regarding the connected devices, 462 462 00:22:11,730 --> 00:22:14,160 we indeed have no connected devices yet, 463 463 00:22:14,160 --> 00:22:17,750 we have no device to test our application. 464 464 00:22:17,750 --> 00:22:19,929 So, that will be the next step. 465 465 00:22:19,929 --> 00:22:22,740 Before that, back into the official docs, 466 466 00:22:22,740 --> 00:22:25,830 we see that we basically have two options. 467 467 00:22:25,830 --> 00:22:28,430 We can use a real device, or an emulator. 468 468 00:22:28,430 --> 00:22:31,530 I'll show you the emulator setup in just a second. 469 469 00:22:31,530 --> 00:22:34,490 We'll also work with a real device throughout the course, 470 470 00:22:34,490 --> 00:22:36,440 but I'll come back to that later. 471 471 00:22:36,440 --> 00:22:37,340 For the moment, 472 472 00:22:37,340 --> 00:22:41,060 you can already install the Google USB Driver here though, 473 473 00:22:41,060 --> 00:22:43,940 you can follow the link you find in the official docs 474 474 00:22:43,940 --> 00:22:46,260 and download and install this tool 475 475 00:22:46,260 --> 00:22:48,960 just as instructed on this page. 476 476 00:22:48,960 --> 00:22:52,470 This is all installed through the Android Studio tool, 477 477 00:22:52,470 --> 00:22:55,870 you'll need that to later connect the real device. 478 478 00:22:55,870 --> 00:22:58,070 So, you'll find all the instructions here, 479 479 00:22:58,070 --> 00:23:01,193 you'll need that later once we do run on a real device. 480 480 00:23:03,470 --> 00:23:06,600 For us here, we'll continue with the Android emulator 481 481 00:23:06,600 --> 00:23:09,030 and for that, we'll need Android Studio, 482 482 00:23:09,030 --> 00:23:10,720 so you can just start it, 483 483 00:23:10,720 --> 00:23:13,310 so that you see this starting screen. 484 484 00:23:13,310 --> 00:23:17,130 And, for one, you can go to the SDK Manager here, 485 485 00:23:17,130 --> 00:23:20,030 and verify that you have an SDK installed 486 486 00:23:20,030 --> 00:23:23,200 and I actually don't just want to use the latest one, 487 487 00:23:23,200 --> 00:23:26,520 but also the latest stable one, which is the latest one 488 488 00:23:26,520 --> 00:23:28,980 with a non single character name 489 489 00:23:28,980 --> 00:23:31,960 so in my case Pie, Android 9. 490 490 00:23:31,960 --> 00:23:36,040 So, I will check this and also installed this SDK, because, 491 491 00:23:36,040 --> 00:23:38,590 unlike the latest one, this is more stable, 492 492 00:23:38,590 --> 00:23:40,270 and I wanna work with that 493 493 00:23:40,270 --> 00:23:42,290 I want to have that installed as well. 494 494 00:23:42,290 --> 00:23:44,460 So, let's make sure you check this. 495 495 00:23:44,460 --> 00:23:48,460 You might even wanna uncheck the other one to ensure 496 496 00:23:48,460 --> 00:23:52,780 that all your Flutter code is turned into Android app 497 497 00:23:52,780 --> 00:23:55,500 with that latest stable SDK. 498 498 00:23:55,500 --> 00:23:58,040 In addition, under SDK tools here, 499 499 00:23:58,040 --> 00:24:00,740 you find the Google USB driver which you need 500 500 00:24:00,740 --> 00:24:03,003 to later connect a real device. 501 501 00:24:03,960 --> 00:24:05,450 With that, let's click apply 502 502 00:24:05,450 --> 00:24:07,850 and this will now install these extra tools 503 503 00:24:07,850 --> 00:24:11,190 and uninstall the SDK which we no longer need 504 504 00:24:11,190 --> 00:24:13,940 and we can wait for this process to finish 505 505 00:24:13,940 --> 00:24:17,070 so that we have the finished setup we need, 506 506 00:24:17,070 --> 00:24:19,410 to build Android apps with Flutter. 507 507 00:24:19,410 --> 00:24:21,550 So, let's wait for that. 508 508 00:24:21,550 --> 00:24:26,000 Now, once that's finished, can click OK here 509 509 00:24:26,000 --> 00:24:28,630 and now we're going to work on the virtual device, 510 510 00:24:28,630 --> 00:24:31,010 which allows us to test a Flutter app. 511 511 00:24:31,010 --> 00:24:33,170 For that, of course, we need a Flutter app. 512 512 00:24:33,170 --> 00:24:35,170 So, I'm back in my development folder 513 513 00:24:35,170 --> 00:24:36,800 where we installed the Flutter tool 514 514 00:24:36,800 --> 00:24:38,270 and the Android SDK. 515 515 00:24:38,270 --> 00:24:40,160 And I'm going to create a new folder here 516 516 00:24:40,160 --> 00:24:41,950 which I'm going to name projects, 517 517 00:24:41,950 --> 00:24:45,470 but you can create that folder anywhere on your system, 518 518 00:24:45,470 --> 00:24:47,380 for example on the desktop, 519 519 00:24:47,380 --> 00:24:51,280 wherever you wanna manage your Flutter projects 520 520 00:24:51,280 --> 00:24:54,130 and when I say project, I basically mean an app, 521 521 00:24:54,130 --> 00:24:55,590 and we're going to build multiple apps 522 522 00:24:55,590 --> 00:24:56,450 throughout this course, 523 523 00:24:56,450 --> 00:24:58,493 so you are going to set up multiple projects 524 524 00:24:58,493 --> 00:25:00,290 throughout this course. 525 525 00:25:00,290 --> 00:25:03,320 Now, here, we're gonna start with our very first project, 526 526 00:25:03,320 --> 00:25:06,990 our very first application and we're going to create 527 527 00:25:06,990 --> 00:25:08,670 that app with the Flutter tool 528 528 00:25:08,670 --> 00:25:10,760 which we installed earlier. 529 529 00:25:10,760 --> 00:25:12,570 For that, we're gonna use the command prompt 530 530 00:25:12,570 --> 00:25:14,560 and there the flutter command, 531 531 00:25:14,560 --> 00:25:18,070 but we need to run this command from inside the folder 532 532 00:25:18,070 --> 00:25:20,500 where we wanna create the project, 533 533 00:25:20,500 --> 00:25:23,330 and currently here in the command prompt, 534 534 00:25:23,330 --> 00:25:26,870 I'm navigated into C:\Users, my username, 535 535 00:25:26,870 --> 00:25:29,950 that's not where I wanna create that app. 536 536 00:25:29,950 --> 00:25:34,363 Instead, I wanna create it on D, development, projects. 537 537 00:25:35,390 --> 00:25:39,252 So, to switch there, I'll first of all type D: 538 538 00:25:39,252 --> 00:25:41,150 to switch to the D partition 539 539 00:25:41,150 --> 00:25:43,570 and then there's the cd command, 540 540 00:25:43,570 --> 00:25:46,170 which stands for change directory, 541 541 00:25:46,170 --> 00:25:48,650 to switch into the development folder 542 542 00:25:48,650 --> 00:25:50,860 and then, after hitting Enter, 543 543 00:25:50,860 --> 00:25:53,610 I'll cd into the projects folder there 544 544 00:25:53,610 --> 00:25:56,860 and now we're in the development projects folder 545 545 00:25:56,860 --> 00:25:58,860 inside of this command prompt. 546 546 00:25:58,860 --> 00:26:01,780 So, now, any commands we're going to run will run 547 547 00:26:01,780 --> 00:26:04,330 inside of that folder, and that's important 548 548 00:26:04,330 --> 00:26:07,430 because we're going to run the flutter create command 549 549 00:26:07,430 --> 00:26:11,920 to create a new app, a new project in that place 550 550 00:26:11,920 --> 00:26:14,257 and I'm going to name it first_app. 551 551 00:26:15,330 --> 00:26:16,840 Now, this name is up to you. 552 552 00:26:16,840 --> 00:26:19,170 This is the name of your first project, 553 553 00:26:19,170 --> 00:26:22,760 the only important thing is that it should be one word, 554 554 00:26:22,760 --> 00:26:26,800 and if it consists of multiple words, like here, first_app, 555 555 00:26:26,800 --> 00:26:29,963 those words should be connected with an underscore. 556 556 00:26:31,410 --> 00:26:34,190 Once you have that you can hit Enter, 557 557 00:26:34,190 --> 00:26:37,440 and this will now create this project folder 558 558 00:26:37,440 --> 00:26:39,093 this application folder. 559 559 00:26:40,000 --> 00:26:42,080 You see it here under projects, 560 560 00:26:42,080 --> 00:26:44,220 there is this first_app folder now 561 561 00:26:44,220 --> 00:26:46,800 and that holds the source code 562 562 00:26:46,800 --> 00:26:49,917 in which we're going to work here in the lib folder, 563 563 00:26:49,917 --> 00:26:53,600 the start file, and a couple of config folders. 564 564 00:26:53,600 --> 00:26:55,950 Now, I'll explain everything about the code 565 565 00:26:55,950 --> 00:26:58,930 and about this configuration throughout this course. 566 566 00:26:58,930 --> 00:27:01,360 We're going to write code in there as well, 567 567 00:27:01,360 --> 00:27:03,360 and I show you how to write code 568 568 00:27:03,360 --> 00:27:06,250 and how to set up everything in the next lecture. 569 569 00:27:06,250 --> 00:27:08,300 For now, let's just run this app, 570 570 00:27:08,300 --> 00:27:10,930 because it turns out that the default app created 571 571 00:27:10,930 --> 00:27:15,420 by Flutter is actually something we can preview on a device, 572 572 00:27:15,420 --> 00:27:18,640 so it gives us a little dummy app out of the box. 573 573 00:27:18,640 --> 00:27:21,710 And to run this, we need that virtual device. 574 574 00:27:21,710 --> 00:27:25,410 So, back here in the Android Studio launch screen, 575 575 00:27:25,410 --> 00:27:29,230 under configure, we now need the AVD manager, 576 576 00:27:29,230 --> 00:27:33,340 which stands for Android Virtual Device Manager. 577 577 00:27:33,340 --> 00:27:37,120 Here we can create and manage our virtual devices. 578 578 00:27:37,120 --> 00:27:38,670 You might already have one, 579 579 00:27:38,670 --> 00:27:40,840 but you can also create a new virtual device 580 580 00:27:40,840 --> 00:27:44,670 by clicking on this Create Virtual Device button. 581 581 00:27:44,670 --> 00:27:47,080 Now, here you can choose any template. 582 582 00:27:47,080 --> 00:27:52,080 I'm going to go with the Pixel 2 phone, and click next here. 583 583 00:27:52,370 --> 00:27:54,400 Now here, you need a system image, 584 584 00:27:54,400 --> 00:27:56,960 which is basically the Android operating system 585 585 00:27:56,960 --> 00:27:59,500 which will be installed on that virtual device, 586 586 00:27:59,500 --> 00:28:02,250 and you wanna go with the latest stable one here, 587 587 00:28:02,250 --> 00:28:04,750 which is the latest one that has a real name, 588 588 00:28:04,750 --> 00:28:06,870 and not just a character identifier. 589 589 00:28:06,870 --> 00:28:10,800 So, in my case it's Pie API level 28. 590 590 00:28:10,800 --> 00:28:13,230 I don't have it yet so I need to download it. 591 591 00:28:13,230 --> 00:28:14,910 So, click on Download here, 592 592 00:28:14,910 --> 00:28:18,630 and this will now install this operating system image, 593 593 00:28:18,630 --> 00:28:22,570 which will be used to set up that virtual device later. 594 594 00:28:22,570 --> 00:28:24,450 So, again, another download 595 595 00:28:24,450 --> 00:28:27,120 for which we have to wait to finish 596 596 00:28:27,120 --> 00:28:30,320 and with that completed, let's click Finish. 597 597 00:28:30,320 --> 00:28:34,110 Select this downloaded image now and click Next. 598 598 00:28:34,110 --> 00:28:36,890 You can leave all the other default settings here 599 599 00:28:36,890 --> 00:28:39,170 as they are and click Finish again 600 600 00:28:39,170 --> 00:28:41,353 and this will now create a new emulator. 601 601 00:28:42,200 --> 00:28:44,360 We can now launch this emulator 602 602 00:28:44,360 --> 00:28:47,120 by clicking this play icon here, 603 603 00:28:47,120 --> 00:28:49,610 and this will spin up this virtual device 604 604 00:28:49,610 --> 00:28:53,960 and launch it so that we can run Android apps on it 605 605 00:28:53,960 --> 00:28:57,430 and this takes us back to the application we created, 606 606 00:28:57,430 --> 00:29:00,080 this first app we built. 607 607 00:29:00,080 --> 00:29:03,430 Because, now, once we started this emulator, 608 608 00:29:03,430 --> 00:29:07,500 we can open an existing Android Studio project here 609 609 00:29:07,500 --> 00:29:11,490 from that starting window of Android Studio 610 610 00:29:12,610 --> 00:29:15,560 and there, under development projects, 611 611 00:29:15,560 --> 00:29:18,960 select your first_app project like this. 612 612 00:29:18,960 --> 00:29:21,450 Now, again, we're not gonna use Android Studio 613 613 00:29:21,450 --> 00:29:24,240 throughout this course, we're not going to write code here 614 614 00:29:24,240 --> 00:29:25,700 throughout this course, 615 615 00:29:25,700 --> 00:29:28,203 but we can get started with this here. 616 616 00:29:29,280 --> 00:29:32,580 Now, when I opened this the first time, I'm prompted here 617 617 00:29:32,580 --> 00:29:35,170 whether I wanna install extra plugins, 618 618 00:29:35,170 --> 00:29:37,270 and I'll click on configure plugins here 619 619 00:29:37,270 --> 00:29:40,220 and choose the Flutter plugin which will help us 620 620 00:29:40,220 --> 00:29:42,093 with Flutter development. 621 621 00:29:43,680 --> 00:29:46,140 Though we could also ignore this here because, again, 622 622 00:29:46,140 --> 00:29:48,780 we're not gonna write Flutter code 623 623 00:29:48,780 --> 00:29:50,940 with Android Studio throughout this course, 624 624 00:29:50,940 --> 00:29:54,050 but it also won't hurt if we add it here. 625 625 00:29:54,050 --> 00:29:57,080 So, after adding this I'll restart Android Studio. 626 626 00:29:57,080 --> 00:30:00,220 This will reopen this project thereafter 627 627 00:30:00,220 --> 00:30:02,193 and now with that opened, 628 628 00:30:03,210 --> 00:30:07,820 make sure that you do have an emulator up and running 629 629 00:30:07,820 --> 00:30:11,420 so that you did start an emulator as shown before. 630 630 00:30:11,420 --> 00:30:13,990 If you didn't do it yet under tools you can get back 631 631 00:30:13,990 --> 00:30:18,720 to the AVD manager and launch our virtual device again. 632 632 00:30:18,720 --> 00:30:22,363 And now, you should see it here in the drop down selected. 633 633 00:30:24,270 --> 00:30:26,880 And now you can press that run button 634 634 00:30:26,880 --> 00:30:31,410 to run your Flutter app on that virtual device. 635 635 00:30:31,410 --> 00:30:34,940 Now, this build process which was started on the device 636 636 00:30:34,940 --> 00:30:38,080 can take a couple of minutes when you run it the first time, 637 637 00:30:38,080 --> 00:30:39,600 don't worry about that. 638 638 00:30:39,600 --> 00:30:43,060 And once it's done you should see your Flutter app running 639 639 00:30:43,060 --> 00:30:46,600 on that emulator and you can hit the plus button here 640 640 00:30:46,600 --> 00:30:48,280 to increment the counter. 641 641 00:30:48,280 --> 00:30:49,250 Pretty awesome. 642 642 00:30:49,250 --> 00:30:52,620 Our Flutter app finally running on an emulator, 643 643 00:30:52,620 --> 00:30:54,843 and of course we'll change this app soon. 644 644 00:30:55,890 --> 00:30:59,670 Now, as I mentioned, I won't use Android Studio, 645 645 00:30:59,670 --> 00:31:03,020 as an editor here and therefore, 646 646 00:31:03,020 --> 00:31:04,520 I also want to show you a way 647 647 00:31:04,520 --> 00:31:07,070 of running this without Android Studio. 648 648 00:31:07,070 --> 00:31:10,100 You can do that by going to the command prompt, 649 649 00:31:10,100 --> 00:31:13,774 navigating into the folder where you have your first_app 650 650 00:31:13,774 --> 00:31:16,830 or into this project folder you created, and in there, 651 651 00:31:16,830 --> 00:31:19,250 you can run flutter run. 652 652 00:31:19,250 --> 00:31:21,690 And this will now do the exact same 653 653 00:31:21,690 --> 00:31:24,580 as you did with the command inside, or with the click 654 654 00:31:24,580 --> 00:31:26,650 of the button inside Android Studio, 655 655 00:31:26,650 --> 00:31:29,400 but without you doing it through Android Studio, 656 656 00:31:29,400 --> 00:31:32,280 it will build the app, and ship it to your emulator 657 657 00:31:32,280 --> 00:31:33,670 and run it there. 658 658 00:31:33,670 --> 00:31:35,900 And this is actually how I will run my apps 659 659 00:31:35,900 --> 00:31:37,150 for the rest of this course, 660 660 00:31:37,150 --> 00:31:39,220 since I won't use Android Studio. 661 661 00:31:39,220 --> 00:31:41,410 You can use either approach, however, 662 662 00:31:41,410 --> 00:31:43,720 using flutter run will have advantages 663 663 00:31:43,720 --> 00:31:46,220 like the hot reloading I'll introduce in a second. 59072

Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.