GGTS无法创建新项目求助:使用GGTS-3.6.4.RELEASE等环境遇问题
Hey there, let's work through this project creation problem together. I've run into similar headaches with older Grails and GGTS setups, so here are some actionable steps tailored to your environment:
Key Checks & Fixes
Verify JDK Compatibility First
Grails 2.4.4 was built to work best with JDK 1.7, not 1.8. Even though 1.8 might seem compatible, the project initialization process often hits snags due to bytecode changes or deprecated Java APIs. Here's how to switch:- Open GGTS and go to
Window > Preferences > Java > Installed JREs - Add your JDK 1.7 installation path and set it as the default JRE
- Double-check
Window > Preferences > Grails > Installed Grails Versionsto ensure your 2.4.4 instance is using the JDK 1.7 you just configured
- Open GGTS and go to
Validate GGTS-Grails Integration
Make sure GGTS is correctly linked to your Grails 2.4.4 setup:- Navigate to
Window > Preferences > Grails > Installed Grails Versions - Confirm the path to your Grails folder is accurate (no red error icons next to it)
- If it's missing, click
Addand browse to your Grails 2.4.4 directory to re-link it
- Navigate to
Bypass the IDE Wizard: Create via Command Line
Sometimes the GGTS wizard has bugs that don't affect the core Grails CLI. Test this:- Open a terminal/command prompt
- Navigate to a folder where you have write access
- Run
grails create-app my-test-project
- If this works, import the project into GGTS using
File > Import > Grails > Existing Grails Project - If the command line also fails, the issue is with your Grails/JDK setup, not GGTS itself
Clean Corrupted Workspace/Caches
Stale cache files or workspace data often cause weird IDE behavior:- Close GGTS completely
- Back up and delete the
.metadatafolder in your workspace directory - Also, delete the
.grailsfolder in your user home directory (this clears cached plugins—you'll need to re-download dependencies for existing projects later) - Reopen GGTS and try creating a project again
Check File Permissions
Ensure the folder where you're trying to create the project has read/write permissions for your user account. On Windows, avoid creating projects inProgram Filesor other restricted folders; on macOS, make sure you're not working in a system-protected directory without proper access.Dig Into GGTS Error Logs
If none of the above works, the error log will give you the exact issue:- Go to
Window > Show View > Other > General > Error Log - Look for entries timestamped around when you tried to create the project—stack traces or error messages like "Failed to initialize Grails project" will point you to the root cause (e.g., missing dependencies, classpath issues)
- Go to
内容的提问来源于stack exchange,提问作者George

