java.lang.IllegalStateException: Resolving configuration 'apiElementsCopy' directly is not allowed

Hot problem!
This exception has a lot of traffic. You can help 23 users by writing a short tip.

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Solutions on the web

via GitHub by jochenberger
, 10 months ago
Resolving configuration 'apiElementsCopy' directly is not allowed
via Stack Overflow by Michele Lacorte
, 6 months ago
Resolving configuration 'debugCompile' directly is not allowed
via GitHub by aley2003
, 7 months ago
Resolving configuration 'apiElements' directly is not allowed
via GitHub by iLavryk
, 7 months ago
Resolving configuration 'apiElements' directly is not allowed
via GitHub by xelibrion
, 8 months ago
Resolving configuration 'apiElements' directly is not allowed
via GitHub by zotona
, 7 months ago
Resolving configuration 'apiElements' directly is not allowed
java.lang.IllegalStateException: Resolving configuration 'apiElementsCopy' directly is not allowed
at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.assertResolvingAllowed(DefaultConfiguration.java:818)
at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.resolveToStateOrLater(DefaultConfiguration.java:419)
at org.gradle.api.internal.artifacts.configurations.DefaultConfiguration.getResolvedConfiguration(DefaultConfiguration.java:414)
at sun.reflect.GeneratedMethodAccessor39.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.codehaus.groovy.reflection.CachedMethod.invoke(CachedMethod.java:93)
at groovy.lang.MetaBeanProperty.getProperty(MetaBeanProperty.java:62)
at org.gradle.internal.metaobject.BeanDynamicObject$MetaClassAdapter.getProperty(BeanDynamicObject.java:213)
at org.gradle.internal.metaobject.BeanDynamicObject.getProperty(BeanDynamicObject.java:156)
at org.gradle.internal.metaobject.CompositeDynamicObject.getProperty(CompositeDynamicObject.java:55)
at org.gradle.internal.metaobject.AbstractDynamicObject.getProperty(AbstractDynamicObject.java:60)
at org.codehaus.groovy.runtime.callsite.PogoGetPropertySite.getProperty(PogoGetPropertySite.java:50)
at com.github.benmanes.gradle.versions.updates.Resolver.resolve(Resolver.groovy:64)
at com.github.benmanes.gradle.versions.updates.Resolver$resolve.call(Unknown Source)
at com.github.benmanes.gradle.versions.updates.DependencyUpdates$_run_closure2$_closure8.doCall(DependencyUpdates.groovy:60)

Users with the same issue

You are the first who have seen this exception.

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.