Error importing gradle project
When I try to import a Gradle project like this:
New Project => Import project from external model => Gradle
I get this error: Can't resolve target gradle project at '/path/to/build.gradle'
My idea.log contains this stacktrace:
2012-02-22 20:04:25,665 [ 18352] INFO - ution.rmi.RemoteProcessSupport - 20:04:25.662 [RMI TCP Connection(3)-127.0.0.1] DEBUG org.gradle.tooling.GradleConnector - Connecting from tooling API consumer version 1.0-milestone-8a
2012-02-22 20:04:25,700 [ 18387] WARN - .plugins.gradle.util.GradleLog - Can't resolve gradle project. Reason: gradle api threw an exception:
java.lang.NoSuchMethodError: org.gradle.tooling.ModelBuilder.get()Lorg/gradle/tooling/model/Element;
at org.jetbrains.plugins.gradle.remote.impl.GradleProjectResolverImpl.doResolveProjectInfo(GradleProjectResolverImpl.java:75)
at org.jetbrains.plugins.gradle.remote.impl.GradleProjectResolverImpl.resolveProjectInfo(GradleProjectResolverImpl.java:54)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.jetbrains.plugins.gradle.remote.impl.GradleApiFacadeImpl$1.invoke(GradleApiFacadeImpl.java:105)
at $Proxy2.resolveProjectInfo(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at sun.rmi.server.UnicastServerRef.dispatch(UnicastServerRef.java:303)
at sun.rmi.transport.Transport$1.run(Transport.java:159)
at java.security.AccessController.doPrivileged(Native Method)
at sun.rmi.transport.Transport.serviceCall(Transport.java:155)
at sun.rmi.transport.tcp.TCPTransport.handleMessages(TCPTransport.java:535)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(TCPTransport.java:790)
at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run(TCPTransport.java:649)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
I can't actually import any gradle project, I tried with some of them.
Any clue?
Please sign in to leave a comment.
I figured it out. The version of Gradle I'm using (1.0-milestone-8a) has been release a few days ago, the 20th February. There are compatibility problems between the intelliJ plugin and the new gradle version. Downgrading to 1.0-milestone-7 everything works fine.
Any plan to release a new version of the plugin?
Thanks