Gradle version uses 2.10 default even if overridden

Hello all, I’m brand new to openfl/lime.

I have a simple project, with project.xml overridden with:

<config:android gradle-version="6.0.1" />

(The default seems to be gradle-2.10, but it doesn’t like the build script, something about a wrapper task already being defined.)

Then I try to compile Android:

lime build android

It fails with:

Unzipping /Users/juanuys/.gradle/wrapper/dists/gradle-6.0.1-bin/2utynci08n9nz6mp3rw1xrebd/gradle-6.0.1-bin.zip to /Users/juanuys/.gradle/wrapper/dists/gradle-6.0.1-bin/2utynci08n9nz6mp3rw1xrebd
Set executable permissions for: /Users/juanuys/.gradle/wrapper/dists/gradle-6.0.1-bin/2utynci08n9nz6mp3rw1xrebd/gradle-6.0.1/bin/gradle

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'bin'.
> java.nio.file.NoSuchFileException: /Users/juanuys/.gradle/wrapper/dists/gradle-2.10-bin/2v0chm5oshw52qn5d7jjz7lo0/gradle-6.0.1/lib/plugins/gradle-diagnostics-6.0.1.jar

Note in the last line how it uses gradle-2.10 and gradle-6.0.1 in the same path.

What am I doing wrong?

Thanks!

This might help
{Solved} Errors when building for android.

Hi @hoang_dung, thanks for the reply. I was hoping to get away with not using 6-year-old Java 8, but I suppose I don’t have a choice. Thanks, it all builds now.

For future reference: downgrade to Java 8 and use the gradle defaults.

2 Likes