Checklist for bringing old projects up-to-date

Android studio usually greats us with a message as shown in fig below to update when there is an update available. clicking on it will update gradle to the latest version.

gradle update available

It is always a good idea to be aware on how to do it manual Ashwell. In This article we’ll see how to update the project to make it up-to-date.

Bringing old projects up-to-date usually consists of the below three steps.

  1. Update gradle android plugin : Gradle plugin is what allows gradle to understand and execute android build. As well as facilitating the synchronization between gradle and android studio’s project model.
  2. Update the gradle wrapper : Scripts and jar that allows gradle to install itself on what ever system we are building on and makes sure anyone build our project is using the same version of gradle.
  3. Update sdk, build tools, libraries: This allows us to use the latest and greatest features of gradle.

1. Update gradle android plugin

To use plugins we need to use gradle dependency management system for the dependencies of the build script itself. So lets open build.gradle script file and update classpath dependency to the latest version and try again to build.

2. Update the gradle wrapper

First- make sure gradle local version is up-to-date. We can do so by typing below command in the terminal. This will give the local version of gradle. Check the latest version online and confirm that's the version you have locally, else download the latest version and install it.

gradle  --version

Second- go back to the terminal and type the below command. This task will re create the wrapper including any updates to the shell scripts or wrapper jar.

gradle  --wrapper

Third- open gradle-wrapper.properties script file. This file figures how the gradle wrapper will function and also what version of gradle the wrapper will use by specifying the distribution URL. make sure the distribution url is pointing towards the latest gradle-version-all.zip. Sync project.

3. Update sdk, build tools, libraries:

Open app build.gradle and update all the dependencies to the latest version. Update the CompileSdkVersion to up-to-date. Make sure buildToolsVersion is also up-to-date.

We can find the latest buildToolsVersion at sdkManager->SDK Tools-> click showPakage details box-> under Android SDK build-tools find the latest version.

Additional Libraries and useful links:

https://bitbucket.org/hvisser/android-apt

https://libgdx.badlogicgames.com/

References:

--

--

--

Mobile app developer

Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Android 13 Is Here! New Features & Changes!

Latest update- Android Studio 4.0 is available with a New Motion

Android’s Activity and it’s life-cycle

OnCollisionEnter Vs. OnTriggerEnter — When to use them?

SVG to Vector Drawable

Everything You Should Know About Binding in Android, Part-2

Toasts, Snackbar, Dialogs nad Notifications in Kotlin

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Nikitha Gullapalli

Nikitha Gullapalli

Mobile app developer

More from Medium

Studies In Program Composition: A New Project — Golf

10 modern job search techniques

Software Intellectual Property

51 Best PL/SQL Interview Questions With Answers 2022