简体   繁体   English

IntelliJ IDEA Grails 3.0错误

[英]IntelliJ IDEA Grails 3.0 Error

I am trying to create a new Grails project with IntelliJ IDEA using the new grails-3.0 M1 SDK but when running create-app I am getting the following error: 我正在尝试使用新的Grails-3.0 M1 SDK使用IntelliJ IDEA创建一个新的Grails项目但是在运行create-app时我收到以下错误:

Error: Could not find or load main class org.codehaus.groovy.grails.cli.support.GrailsStarter

With previous grail versions works fine (I got the environment variables configured correctly) 以前的grail版本工作正常(我正确配置了环境变量)

Any workarounds about it? 有关它的任何变通方法吗?

Thanks 谢谢

Are you trying to use the grails integration in idea? 您是否尝试将grails集成在想法中? Grails 3 is so different, I doubt that will work. Grails 3是如此不同,我怀疑它会起作用。 Just create-app from the command line, and import the project into idea from the build.gradle file that creates. 只需从命令行创建app,然后从创建的build.gradle文件中将项目导入到idea中。

Until it's updated to work with grails 3, you'll need to use the command line or the grails shell to issue commands 在更新为使用grails 3之前,您需要使用命令行或grails shell来发出命令

Don't forget, you're trying a milestone release (not even a beta, or release candidate), so you're living on the cutting edge, and tooling might take a bit to catch up with you ;-) 不要忘记,你正在尝试一个里程碑版本(甚至不是测试版或发布候选版),所以你生活在最前沿,工具可能需要一点时间来赶上你;-)

Grails 3 uses gradle. Grails 3使用gradle。 So create your app with grails create-app, and you can open the project as a gradle one. 因此,使用grails create-app创建您的应用程序,您可以将项目作为gradle打开。 You loose the grails view, but it works. 你松散了grails视图,但它确实有效。

Make sure there are no other java paths on your system, sometimes it may happen in windows that before your actual path you have something like "C:\\ProgramData\\Oracle\\Java\\javapath" in your system path. 确保您的系统上没有其他Java路径,有时可能会在您的实际路径之前的窗口中发生类似于系统路径中的“C:\\ ProgramData \\ Oracle \\ Java \\ javapath”的路径。 if you have this just delete it and run a new cmd and test again. 如果你有这个只是删除它并运行一个新的cmd并再次测试。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM