#IDE nor working
38 messages · Page 1 of 1 (latest)
⌛ This post has been reserved for your question.
Hey @pearl lintel! Please use
/closeor theClose Postbutton above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
Try File -> Invalidate Caches & Restart
17.0.6
can you share your project structure
I wrote the question into my course's forum and someone said I have to ONLY import the folder where the gradle files also are, otherwise the IDE doesnt know its a java program
Is that right?
if you show me your project structure I can tell you more
Do you mean this?
sorry I meant your file tree, on the left side of your screen were all the classes are located
does building the project work ?
In this case I CAN actually create java-documents in the java file. But like this it doesnt work:
Yes
here intelliJ should work as expected and the auto completion should work.
Here you aren't setting the source path. In this case autocompletion does not work
So I ALWAYS have to be in a folder where there only is src/main/java for classes?
No, you can set your own source directories. Could you share your build.gradle file.
is any folder marked blue in this project ?
Except the small blue block in the gradle folder no
build.gradle:
id 'java'
id 'application'
}
application {
mainClassName ='Telefon'
}
repositories {
mavenCentral()
}
dependencies {
implementation group: 'com.google.guava', name: 'guava', version: '23.5-jre'
}```
Are you trying to "combine" multiple projects here ?
Kind of, yes. I get a few tasks each week, so I make a folder for each week
Ah yeah, don't do that in IntelliJ this does work in Eclipse, having multiple projects in one workspace, but in IntelliJ I would just create a new package per week, except of course the build.gradle changes.
Well, I am putting the tasks for a week in one folder. Isnt that a package ?
well theoretically yes, but a package is a folder inside the source folder. Right now you are copying the entire project, including folders like .idea and build which are unnecessary.
Create a new Project and let IntelliJ configure gradle for you. You can add dependencies later but the important part is that you only copy the actual source files into the source folder, inside a new package for example.
Thanks! I actually never made a project in IntelliJ itself but always cloned all files from GitHub
If you are finished with your post, please close it.
If you are not, please ignore this message.
Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.
If you have any further problems let me know
Thats all for today. I already annoyed too many people in our forum 😛