IntelliJ IDEA 9.0 - unable to select project SDK for Grails application

我是研究僧i 提交于 2019-11-30 03:12:30

问题


I'm convinced that I'm just having a bad day and missing something obvious. I'm trying to create a new Grails project in IntelliJ IDEA 9.0 and I am unable to associate it with an SDK. I've tried creating a project from scratch and creating a project from existing sources. In either case, I get to the "Please select project JDK" screen and my only options are:

  • JSDK
  • IntelliJ IDEA Plugin SDK
  • Mobile SDK
  • Flex SDK
  • AIR SDK
  • Flexmojos SDK

Select project JDK http://img521.imageshack.us/img521/5793/idea1n.jpg

When I used IntelliJ IDEA 8.1.3, it would ask me the same thing and I would simply navigate to C:\Grails and everything worked fine. I've even tried adding the SDK in the following locations, but to no avail.

  • File -> Project Structure -> Project Settings -> Project SDK -> New
  • File -> Project Structure -> Platform Settings -> SDKs -> Add New SDK

I'm missing something really obvious, right?


回答1:


They Changed the way that this is done in Intellij 9.0. You are going to want to right-click on the Module and click "Add Framework Support"

This will bring up a dialog where you can select a new Groovy SDK. Choose your Grails Location and hit OK.

http://www.jetbrains.com/idea/webhelp/adding-frameworks-support.html

http://www.jetbrains.com/idea/webhelp/frameworks-support.html




回答2:


Unfortunately, it isn't quite a simple as that. It appears your GROOVY_HOME needs to point to the version of Groovy you actually wish to use, and when defining the Global Groovy library, you need to make sure you add the individual jar files, not the whole jar directory (otherwise IDEA doesn't recognize its a Groovy install).



来源:https://stackoverflow.com/questions/1915199/intellij-idea-9-0-unable-to-select-project-sdk-for-grails-application

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!