2

In my React Native app, I got an error about incompatibilities with gradle 6, so I looked in my project structure to find out which version of gradle I was running in my project. I found this line in gradle-wrapper.properties

distributionUrl=https\://services.gradle.org/distributions/gradle-5.5-all.zip

and this line in build.gradle

classpath("com.android.tools.build:gradle:3.4.2")

What I Want To Know: What's the difference between the reference to gradle in each of these files? In other words, how is version 5.5 being used in my project, and how is 3.4.2 being used?

gkeenley
  • 6,088
  • 8
  • 54
  • 129

1 Answers1

5

distributionUrl represents Gradel Version where as classpath represents Android Gradle plugin version.

Gradel vs Android Gradle plugin: Reffer this difference between android gradle plugin and gradle

Gradle is the build system.

You can use it with a lot of plugins. One of these is the plugin for Android.
It is used to provide processes and configurable settings that are specific to building and testing Android applications.

For greater details and mapping of the above two type of versions refer the following URLs https://developer.android.com/studio/releases/gradle-plugin#updating-gradle https://developer.android.com/studio/releases/gradle-plugin#updating-plugin

I hope this answer has cleared your doubts.

Nitesh
  • 3,868
  • 1
  • 20
  • 26