Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Problem after adding external dependencies in IntelliJ

I'm starting a project using the KorGE library, and I would like to use Retrofit as XML parser. So I try to follow this guide, which seems fine, but I just poorly get stuck by adding the dependencies in the first step.

I already have the KorGE libraries included (I started from the template):

dependencies {
    classpath("com.soywiz.korlibs.korge.plugins:korge-gradle-plugin:$korgePluginVersion")
    classpath("com.soywiz.korlibs.klock:klock:1.6.1")
}

But when I try to includes the following dependencies, everything turns to hell when I load gradle changes (I guess this is the way I should declare them?):

classpath("com.squareup.retrofit:retrofit:2.4.0")
classpath("com.squareup.retrofit:converter-simplexml:2.4.0")

In the guide it seems that this dependencies are part of APIs, but I did not found anything different about declaration on the net. If I just copy-past it obviously doesn't work.

The errors I get after loading gradle changes:

java.lang.IllegalArgumentException: org.gradle.api.internal.initialization.DefaultClassLoaderScope@a2e5ac5 must be locked before it can be used to compute a classpath!
java.lang.IllegalArgumentException: project.classLoaderScope must be locked before querying the project schema

Thank you very much in advance for your help guys, and sorry for my noobiness.

like image 762
vsilaire Avatar asked Feb 14 '26 18:02

vsilaire


1 Answers

Removing org.gradle.configureondemand=true in ~/.gradle/gradle.properties solved it for me.

like image 67
user2403257 Avatar answered Feb 16 '26 07:02

user2403257



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!