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.
This happens if something messed up your gradle environment. Remove your
~/.gradle/
directory or invalidate the caches of gradle. That should do the trick.