Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save bharat-tiwari/13a1095d722a63792e9c76c689af6d29 to your computer and use it in GitHub Desktop.
Save bharat-tiwari/13a1095d722a63792e9c76c689af6d29 to your computer and use it in GitHub Desktop.
React Native - Android - Upgrade the gradle version

Version compatibility between GPP, the React-Native Android project's gradle version and Android tools

GPP's most recent version as of the writing of this post is GPP 2.8.0. This version requires Gradle version ≥ 6 and Android tools build gradle version in our app ≥ 4.0.

Upgrade the gradle version

On your terminal, cd to the app's project folder, then run below commands to upgrade the gradle version of the app's android project. The latest gradle version as of writing of this post is 6.5👇

cd android
./gradlew wrapper --gradle-version=6.5 --distribution-type=ALL

[In case you get build error after running above command, try adding multiDexEnabled false to defaultConfig properties of the android/app/build.gradle file. Then clean the project build and build again from android studio

./gradlew clean

Open the project in Android studio. Once Build sync completes, clean (Main menu → Build → Clean Build) and rebuild (Main menu → Build → Rebuild Build) the project.]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment