克隆后IntelliJ不能识别java项目 [英] IntelliJ doesn't recognize java project after cloning

查看:150
本文介绍了克隆后IntelliJ不能识别java项目的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经从bitbucket中克隆了我的repo,并试图在IntelliJ IDE中打开它,但我无法设置Debug Configuration,也无法在Application菜单中设置Main类。我也无法将新的Java类添加到项目中。我认为Intellij无法识别这个项目是Java。



是否有可能使它正确?

解决方案

您必须将 src 目录标记为源根目录。 >右键单击 src 文件夹并选择 Sources Root





然后您会看到图标会发生变化:









EDIT



通过调用 Project Structure 视图来检查输出路径。



Ctrl + Alt + Shift + S




I've cloned my repo from bitbucket and I am trying to open it in IntelliJ IDE, but i can't set Debug Configuration, can't set Main class in Application menu. I can't also add new Java class into project. I think that Intellij can't recognize this project is Java.

Is it possible to make it right?

解决方案

You have to mark your src directory as Source Root.

Right-click on the src folder and select Sources Root:

Then you'll see that the icons will change:



EDIT

Check the output path by bringing up the Project Structure view.

Press Ctrl+Alt+Shift+S

这篇关于克隆后IntelliJ不能识别java项目的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆