问题
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.
回答1:
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
来源:https://stackoverflow.com/questions/51479691/how-can-i-upgrade-react-native-gradle-version