So just before we continue on with
working on our button counter app, I want
to have a look at a potential warning, or a
warning that we're actually getting when
we open the application, when we open the
project now. We get this error over here,
Outdated Kotlin Runtime, and
that's because we updated the plugin but
we haven't updated the Kotlin runtime,
and so there's a bit of a conflict
between the two. And at the moment, when
I try and click on Update Runtime we
get an error here, basically, a warning
saying that we need to do it manually.
Now in the future, this may well be
updated automatically for us, but as of
the time of shooting these videos we
need to do it manually. So you can
continue on if you see that warning,
we don't have to change it, but it's a
good idea to do it. So to fix it, what we
want to do is, we need to open our Gradle
file and come down here. Now there's two
Gradle files in the project. There's this
build.gradle, and we will be changing
that. You'll see this in the course as
we're adding new versions of libraries
and so forth. But that's not the one that we
need to change here. We need to change the
second one, build.gradle down here.
So I'll double click on that, and you can see
here it's currently got the Kotlin
version of 1.1.3-2, and
you can see down here that this
is the one that it relates to. So what
I'm going to do is come over here and
take a copy of this 1.1.4,
and I'm going to replace that. So I,
basically, paste it over the top of the old
version. So I'm going to click on Sync
Now. So what should now happen is that the
new version should be downloaded, and our
Android Studio project updated, and then
we should be able to continue on without
getting any warnings. So if you see
something like that, do the same thing as
I've done there and update manually, but
at some point in time it'll probably
become an automatic process. Alright, so
you can see it down the bottom there,
working away. So, okay, you can see now
that it seems to have finished. We've got
the build, the Gradle build finished and
if I close down the project again, always
a good way of testing here, and then open
it again. And if I have a look at this now,
we're actually running 1.1.4,
but now it's actually saying
that the plugin
version is 1.1.4 -
release - Studio 3.0 - 2. I don't think we
actually are running the same version,
but it's got to do with the fact that
Android Studio is still beta, as at the
time that I'm recording these videos,
because if we actually take a copy of
this, I suspect it probably won't work.
So if I try and update this now to that
exact string, I will say, probably we'll
get an error. And you can see we've got
an error there that it, essentially, can't
find the file when that relates to the
version being wrong. So I'm just going to put
a dot on the end there, just in case that
was significant. Try that again. Again, I
suspect we'll get an error here. Same
error, so we go back now to the previous
version that I added in this video,
1.1.4, and try again. We
can see that that's been accepted but
we'll still get that warning each time
we actually load up. So again, I'll just close
the project down and open it up again.
We're still getting a warning here but
you can see clearly now, that we're
actually running 1.1.4,
the newer version, and the plugin version
is 1.1.4 - release -
Studio 3.0 - 2. So in this
case, we can click on ignore
because we know that we're running the
right version and then if a future
version comes up, we can then update that.
Alright, so I'm going to close down
these two files now, the two build.gradle
files we opened, and I'll end the video
here and keep this separate. And in the
next video we'll actually move on then
and continue working on our app, and
we're going to start by discussing the
activity lifecycle. So I'll see you in
the next video.