1 00:00:04,560 --> 00:00:06,900 So just before we continue on with 2 00:00:06,900 --> 00:00:09,150 working on our button counter app, I want 3 00:00:09,150 --> 00:00:11,730 to have a look at a potential warning, or a 4 00:00:11,730 --> 00:00:13,320 warning that we're actually getting when 5 00:00:13,320 --> 00:00:14,850 we open the application, when we open the 6 00:00:14,850 --> 00:00:17,220 project now. We get this error over here, 7 00:00:17,220 --> 00:00:19,680 Outdated Kotlin Runtime, and 8 00:00:19,680 --> 00:00:22,590 that's because we updated the plugin but 9 00:00:22,590 --> 00:00:24,120 we haven't updated the Kotlin runtime, 10 00:00:24,120 --> 00:00:25,290 and so there's a bit of a conflict 11 00:00:25,290 --> 00:00:27,660 between the two. And at the moment, when 12 00:00:27,660 --> 00:00:29,820 I try and click on Update Runtime we 13 00:00:29,820 --> 00:00:31,860 get an error here, basically, a warning 14 00:00:31,860 --> 00:00:33,410 saying that we need to do it manually. 15 00:00:33,410 --> 00:00:36,120 Now in the future, this may well be 16 00:00:36,120 --> 00:00:38,760 updated automatically for us, but as of 17 00:00:38,760 --> 00:00:40,589 the time of shooting these videos we 18 00:00:40,589 --> 00:00:42,780 need to do it manually. So you can 19 00:00:42,780 --> 00:00:44,519 continue on if you see that warning, 20 00:00:44,519 --> 00:00:45,899 we don't have to change it, but it's a 21 00:00:45,899 --> 00:00:49,109 good idea to do it. So to fix it, what we 22 00:00:49,109 --> 00:00:51,390 want to do is, we need to open our Gradle 23 00:00:51,390 --> 00:00:53,429 file and come down here. Now there's two 24 00:00:53,429 --> 00:00:55,769 Gradle files in the project. There's this 25 00:00:55,769 --> 00:00:58,499 build.gradle, and we will be changing 26 00:00:58,499 --> 00:00:59,699 that. You'll see this in the course as 27 00:00:59,699 --> 00:01:02,249 we're adding new versions of libraries 28 00:01:02,249 --> 00:01:04,559 and so forth. But that's not the one that we 29 00:01:04,559 --> 00:01:06,150 need to change here. We need to change the 30 00:01:06,150 --> 00:01:08,149 second one, build.gradle down here. 31 00:01:08,149 --> 00:01:10,740 So I'll double click on that, and you can see 32 00:01:10,740 --> 00:01:12,630 here it's currently got the Kotlin 33 00:01:12,630 --> 00:01:15,540 version of 1.1.3-2, and 34 00:01:15,540 --> 00:01:17,040 you can see down here that this 35 00:01:17,040 --> 00:01:19,020 is the one that it relates to. So what 36 00:01:19,020 --> 00:01:20,310 I'm going to do is come over here and 37 00:01:20,310 --> 00:01:21,810 take a copy of this 1.1.4, 38 00:01:21,810 --> 00:01:26,310 and I'm going to replace that. So I, 39 00:01:26,310 --> 00:01:27,869 basically, paste it over the top of the old 40 00:01:27,869 --> 00:01:29,610 version. So I'm going to click on Sync 41 00:01:29,610 --> 00:01:32,340 Now. So what should now happen is that the 42 00:01:32,340 --> 00:01:35,039 new version should be downloaded, and our 43 00:01:35,039 --> 00:01:38,159 Android Studio project updated, and then 44 00:01:38,159 --> 00:01:39,869 we should be able to continue on without 45 00:01:39,869 --> 00:01:41,549 getting any warnings. So if you see 46 00:01:41,549 --> 00:01:43,560 something like that, do the same thing as 47 00:01:43,560 --> 00:01:46,109 I've done there and update manually, but 48 00:01:46,109 --> 00:01:47,250 at some point in time it'll probably 49 00:01:47,250 --> 00:01:50,159 become an automatic process. Alright, so 50 00:01:50,159 --> 00:01:51,390 you can see it down the bottom there, 51 00:01:51,390 --> 00:01:57,149 working away. So, okay, you can see now 52 00:01:57,149 --> 00:02:00,210 that it seems to have finished. We've got 53 00:02:00,210 --> 00:02:03,240 the build, the Gradle build finished and 54 00:02:03,240 --> 00:02:05,009 if I close down the project again, always 55 00:02:05,009 --> 00:02:08,038 a good way of testing here, and then open 56 00:02:08,038 --> 00:02:12,230 it again. And if I have a look at this now, 57 00:02:12,230 --> 00:02:14,489 we're actually running 1.1.4, 58 00:02:14,489 --> 00:02:16,650 but now it's actually saying 59 00:02:16,650 --> 00:02:18,190 that the plugin 60 00:02:18,190 --> 00:02:19,840 version is 1.1.4 - 61 00:02:19,840 --> 00:02:23,980 release - Studio 3.0 - 2. I don't think we 62 00:02:23,980 --> 00:02:25,330 actually are running the same version, 63 00:02:25,330 --> 00:02:27,040 but it's got to do with the fact that 64 00:02:27,040 --> 00:02:29,560 Android Studio is still beta, as at the 65 00:02:29,560 --> 00:02:30,850 time that I'm recording these videos, 66 00:02:30,850 --> 00:02:34,090 because if we actually take a copy of 67 00:02:34,090 --> 00:02:35,910 this, I suspect it probably won't work. 68 00:02:35,910 --> 00:02:38,440 So if I try and update this now to that 69 00:02:38,440 --> 00:02:41,890 exact string, I will say, probably we'll 70 00:02:41,890 --> 00:02:46,810 get an error. And you can see we've got 71 00:02:46,810 --> 00:02:48,820 an error there that it, essentially, can't 72 00:02:48,820 --> 00:02:50,290 find the file when that relates to the 73 00:02:50,290 --> 00:02:51,580 version being wrong. So I'm just going to put 74 00:02:51,580 --> 00:02:53,170 a dot on the end there, just in case that 75 00:02:53,170 --> 00:02:56,830 was significant. Try that again. Again, I 76 00:02:56,830 --> 00:02:59,920 suspect we'll get an error here. Same 77 00:02:59,920 --> 00:03:02,380 error, so we go back now to the previous 78 00:03:02,380 --> 00:03:04,630 version that I added in this video, 79 00:03:04,630 --> 00:03:10,090 1.1.4, and try again. We 80 00:03:10,090 --> 00:03:12,250 can see that that's been accepted but 81 00:03:12,250 --> 00:03:13,990 we'll still get that warning each time 82 00:03:13,990 --> 00:03:16,180 we actually load up. So again, I'll just close 83 00:03:16,180 --> 00:03:19,959 the project down and open it up again. 84 00:03:19,959 --> 00:03:21,760 We're still getting a warning here but 85 00:03:21,760 --> 00:03:23,200 you can see clearly now, that we're 86 00:03:23,200 --> 00:03:24,819 actually running 1.1.4, 87 00:03:24,819 --> 00:03:27,280 the newer version, and the plugin version 88 00:03:27,280 --> 00:03:29,650 is 1.1.4 - release - 89 00:03:29,650 --> 00:03:32,110 Studio 3.0 - 2. So in this 90 00:03:32,110 --> 00:03:34,390 case, we can click on ignore 91 00:03:34,390 --> 00:03:35,950 because we know that we're running the 92 00:03:35,950 --> 00:03:37,150 right version and then if a future 93 00:03:37,150 --> 00:03:39,400 version comes up, we can then update that. 94 00:03:39,400 --> 00:03:41,920 Alright, so I'm going to close down 95 00:03:41,920 --> 00:03:44,920 these two files now, the two build.gradle 96 00:03:44,920 --> 00:03:46,900 files we opened, and I'll end the video 97 00:03:46,900 --> 00:03:48,879 here and keep this separate. And in the 98 00:03:48,879 --> 00:03:50,379 next video we'll actually move on then 99 00:03:50,379 --> 00:03:52,989 and continue working on our app, and 100 00:03:52,989 --> 00:03:54,340 we're going to start by discussing the 101 00:03:54,340 --> 00:03:56,560 activity lifecycle. So I'll see you in 102 00:03:56,560 --> 00:03:59,040 the next video.