0

When I create a new Gradle project, the Gradle version is 3.3. But when I import an existing Gradle project, the Gradle version is 2.4.11. How are the version determined, especially the last one, because as far as I can see, there is no Gradle version information in the existing Gradle project.

ericj
  • 2,138
  • 27
  • 44

2 Answers2

0

I don't know am I understand your issue correctly or not. But as I understood:

The version of gradle is determined in your build.gradle file.

There is a line there like below: classpath 'com.android.tools.build:gradle: 2.2.2'

which 2.2.2 is the version.

the highest stable version till now is 2.2.3 (which it is not suitable for me) .

  • Note that versions above 2.2 need jdk 8 (not work with jdk 7)
0

I found out that you have to look at the file gradle/wrapper/gradle-wrapper.properties. The last line of this file gives the Gradle version:

distributionUrl=https\://services.gradle.org/distributions/gradle-3.3-bin.zip

Before importing an existing Gradle project, maybe you want to edit this line.

ericj
  • 2,138
  • 27
  • 44