Open Psyf opened 6 years ago
Err... shot in the dark: Is your project structure OK? Sources root marked appropriately? This should get your MainApp running.
For junit, you need to provide a version (not sure if you have done it but still it is not picked up)
Later after import, the project directory was properly back in display. Project structure has JDK 9 correctly selected. Is there something else I should check?
For the junit version, I'm guessing mentioned inside grade.build file. Here's where I find it: (sorry for literal screenshot, my laptop is off the grid rn)
If I can't solve it soon, I guess I'll just do a clean reinstall.... Again.
Junit seems fine. No issues.
Project structure has JDK 9 correctly selected. Is there something else I should check?
I meant, the sources folder in the directory structure:
If they are identified properly, the ide should find the MainApp#main()
If not, I am not too sure. I have asked the AB devs, let me see what answer they have.
src/
seems okay to me.
Might this Application
in red be the problem?
It was red since 1.1 anyway, so I don't think so.
EDIT: I followed IDEA's suggestion and chose the first option. Application
is no longer red but MainApp#main() is still not found. I verified main() was actually there as the last function of the file:
public static void main(String[] args) { launch(args); }
I first thought "Seems like your JavaFx is not detected?" Since you say it was red since 1.1, I don't know cause π Let us wait for the AB dev's to say something?
Update: Reinstallation did not help. More info for your AB devs:
Yeah, let's wait. I was looking forward to binge coding this mini-vacation :(
This comment may be incorrect / not apply to you, but when I see the
Could not find org.junit.jupiter:junit-jupiter-api:.
It should not be the jupiter version of junit right? Cause for my project, we didn't use the jupiter version but the "normal" version. EDIT: Then again, my group is using AB3 so it might not apply
@0WN463 I'm not sure either.
Interesting observation:
In build.gradle I changed one line in dependencies{}
from implementation 'org.junit.jupiter:junit-jupiter-api'
to implementation 'org.junit.jupiter:junit-jupiter-api:5.1.0'
After this, gradlew
and gradlew build
run properly.
Still no luck with MainApp#main() though :/
From the devs:
First step is to always:
- Do a CLEAN clone of the repo
- Re-set up the project.
Hi @okkhoy ,
I'm not sure what a CLEAN clone
of the repo is.
Do you mean delete my clone and clone from origin/master (personal fork)? If so, I've done that.
I've re-setup the project multiple times too.
Good news is:
I can now run it through gradlew run
on IDEA's terminal.
The green play button on the top right still can't find the MainApp#main()
Good news is: I can now run it through gradlew run on IDEA's terminal.
Great! Some progress π though that is not the full solution.
The green play button on the top right still can't find the MainApp#main()
Is the run configuration ok?
Is your origin/master consistent with your team's upstream?
Clean clone means remove everything related to your codebase from your local and clone.
Could also try to delete the .gradle
folder in your home folder (not sure if that helps though! but it will redowload all the dependencies again)
Yes, sir. The origin/master is up-to-date.
I'm not sure what the configurations should look like. I'll match with a friend's I think. Here is a screenshot:
I've done gradlew clean
and that's not helped.
To be honest, I don't know much about gradle or maven or java specific development tools that well even as the mod comes to a close.
Your run configuration seems OK. I have run out of ideas now π
We don't expect you to master build tools in this module. You need to know the basic usage and understand something when you read a build.gradle
file!
This seems like some corner case that even many experienced folks may need time to figure out. For all you know, you may be hitting some IntelliJ bug, which may be unrelated to gradle.
Well, that sucks. I can't use the debugger anymore and have to rely on white-text logs from the terminal. I guess I'll just live with it till v1.4. Don't want to risk IDEA breaking down again before final release.
Thanks for the help everyone. Feel free to close the issue if you want @okkhoy
If it helps, try it on a VM where you start with a clean slate.
Hi @okkhoy
Context: I was cleaning up my local repo (getting rid of branches except master). Afterwards, when I opened IntelliJ, the folder structure was gone. I thus closed the project, and reimported as per the steps in AB4 DG.
Problem: Even after
gradlew precessResources
returns success, runningMainApp.java
yields the following error:What I tried:
gradlew build
; following is the error:FAILURE: Build failed with an exception.
What went wrong: Could not resolve all files for configuration ':compileClasspath'.
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
Deprecated Gradle features were used in this build, making it incompatible with Gradle 5.0. See https://docs.gradle.org/4.8.1/userguide/command_line_interface.html#sec:command_line_warnings
BUILD FAILED in 1s 1 actionable task: 1 executed