Coding With Fun
Home Docker Django Node.js Articles Python pip guide FAQ Policy

How to change the version of gradle in a project?


Asked by Ember McConnell on Dec 04, 2021 Gradle



Change your gradle version in project setting: If you are using mac,click File -> Project structure ,then change gradle version,here: And check your build.gradle of project,change dependency of gradle,like this: I deleted content of ' .gradle/caches ' folder in user home directory (windows).
Moreover,
So try to rename a version variable to something differing from version and set it with -P flag before command, like: If you move version entry to gradle.properties file you can also: You can pass the project version on cli with -Pversion=... as long as you don't set it in build.gradle.
Subsequently, The specified Gradle version is downloaded and used to run the build file. If we want to use another Gradle version, we can invoke the wrapper task with the --gradle-version option. We must specify the Gradle version that the Wrapper files are generated for.
In this manner,
The default versions of several code quality plugins have been updated. Several library versions used by Gradle have been upgraded. If you are not already on version 4.10, skip down to the section that applies to your current Gradle version and work your way up until you reach here.
Furthermore,
Step 1: Open Android Studio and navigate to File → Settings Then just click on Build, Execution, Deployment Tab Build → Tools → Gradle → Use default Gradle wrapper (recommended) option. Step 2: Selecting desired Gradle version. Go to File → Project Structure