Reputation: 413
I am working on a react-native project which has gradle version of 4.4 (can be found in project folder /android/.gradle/4.4) but I want to upgrade it to latest one which is 6.0.1. Please help me
I want to change the version in red to 6.0.1(latest) not the one in white
Upvotes: 7
Views: 13573
Reputation: 564
Change gradle version here:
android/gradle/wrapper/gradle-wrapper.properties
in:distributionUrl=https\://services.gradle.org/distributions/gradle-6.7.1-all.zip
Then you need to change the plugin version in:
android/build.gradle
classpath("com.android.tools.build:gradle:4.2.0")
You can see the gradle version for each plugin here:
https://developer.android.com/studio/releases/gradle-plugin.html#updating-gradle
Upvotes: 3
Reputation: 12195
Inside android>gradle>wrapper>gradle-wrapper.properties
update the distributionUrl to your specific gradle like :
distributionUrl=https\://services.gradle.org/distributions/gradle-6.0.1-all.zip
Hope it helps. feel free for doubts
Upvotes: 18
Reputation: 99
In android/build.gradle you have to edit this line
classpath 'com.android.tools.build:gradle:x.y.z'
Change x.y.z with the version you want. Edit it with Android Studio then click Sync now
Upvotes: 0