简体   繁体   中英

libgdx's gradlew doesn't work in Fedora

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM