Warm tip: This article is reproduced from serverfault.com, please click

How can I upgrade react-native gradle version

发布于 2018-07-23 13:13:06

I need help. I can't upgrade gradle version of my react-native project.

I try a lot of things, downloaded last version of Android Studio & SDK Tools etc.

I changed this file \android\gradle\wrapper\gradle-wrapper.properties, I tried to upgrade using npm install -g react-native-git-upgrade but still I can't upgrade it.

When I react-native eject It's exports "distributionUrl=https://services.gradle.org/distributions/gradle-2.14.1-all.zip"

Waiting for answers.

Questioner
Siberhecy
Viewed
0
Daniel Gabor 2018-07-23 23:00:20

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