0

So I tried to create a libgdx project with libgdx-setup:

./gradlew desktop:run 


And I got the following output:

Configuration on demand is an incubating feature.
:core:compileJava

FAILURE: Build failed with an exception.

* What went wrong:
Could not resolve all dependencies for configuration ':core:compile'.

Unexpected lock protocol found in lock file. Expected 3, found 0.

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 1.281 secs

It is really strange as I have never met this trouble before. I searched through the internet and I got nothing useful, so I come here to ask for help. Any answer will be appreciated. Thanks.

heo
  • 116
  • 11

1 Answers1

0

This happens if something messed up your gradle environment. Remove your ~/.gradle/ directory or invalidate the caches of gradle. That should do the trick.

Nitram
  • 6,486
  • 2
  • 21
  • 32
  • This happens when I am using gdx-setup.jar to create a gdx project and I don't know how to redownload dependencies. – heo Jun 19 '15 at 15:34
  • Have you tried calling it with `--refresh-dependencies` ? – Nitram Jun 19 '15 at 15:36