4

I am using IDEA - 11.1.1 and gradle - gradle-1.0-milestone-9 (I tried with release candidate 3 also) on windows-7 (if this matters) After importing gradle porject, IDEA complains about String object. I think I am missing something about grrovy configuration. I have also marked - main and test folder as Sources and Test Resources respectively. Did I miss something obvious?

enter image description here

4
  • Do you have a jdk/gdk configured? Commented May 8, 2012 at 17:57
  • Could you elaborate more? I can see java and groovy using java -v and groovy -v Commented May 8, 2012 at 18:18
  • 1
    Irrelevant to Intellij; they need to be configured in the project's settings--I've only seen errors like that when java or groovy isn't configured correctly. Ymmv. Commented May 8, 2012 at 18:27
  • Works fine here. I am using the same IntelliJ version. Groovy is 1.8.0. In build.gradle I have the groovy plugin configured and in dependencies section I have groovy "org.codehaus.groovy:groovy-all:1.8.0". Btw, I have generated IntelliJ settings files with gradle idea, but I should work with gradle import in the same way, I presume. Commented May 9, 2012 at 0:53

3 Answers 3

9

Most likely the JDK isn't set correctly in IDEA. Go to File -> Project Structure -> Project and check/fix Project SDK.

Sign up to request clarification or add additional context in comments.

Comments

0

Try checking your project and module sdk.

On your module select F4 or Right click "Open Module Settings" Check your SDK and Moduel SDK

I am sure that will resolve your problem.

Comments

0

Check your IDEA project settings and look if your JDK is configured properly.

I suggest you use the gradle idea plugin to create your IDEA project files, instead of using the import function of existing gradle projects into IDEA, since from my experience it gave me troubles. Also adding new jars via gradle and updating your IDEA project files via gradle seems more consistent.

I uploaded a build.gradle gist, which might give you a good start: https://gist.github.com/1580234

It contains some explanatory comments.

Greets,

Jan

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.