Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How do I build the sample? #2

Open
curvedinf opened this issue Feb 20, 2024 · 11 comments
Open

How do I build the sample? #2

curvedinf opened this issue Feb 20, 2024 · 11 comments

Comments

@curvedinf
Copy link

I'm new to Kotlin and don't know how to build the sample project.

@LeHaine
Copy link
Member

LeHaine commented Feb 21, 2024

Hello!

You can open up the project inside IntelliJ and run either the Samples.kt or FlappyBirdApp.kt under the jvmMain directory to run on your desktop.

@curvedinf
Copy link
Author

curvedinf commented Feb 22, 2024

Doesn't appear to work for me

image

I think you'd also need to run something in gradle to get the dependencies, no?

@LeHaine
Copy link
Member

LeHaine commented Feb 22, 2024

Strange. It should have already downloaded the dependencies before it attempted to run. Which OS are you using?

@curvedinf
Copy link
Author

Ubuntu 22.04

@ju-h4
Copy link

ju-h4 commented Mar 1, 2024

I now have the same problem, although it worked at first.

Maybe this is related to the latest IntelliJ version? In any case, I had updated it in the meantime.

For some reason, the dependencies of com.lehaine.littlekt:core:xxx are not included.
The only temporary solution seems to be to define the dependencies (lwjgl, etc.) again in your own project, then it works.

image

But for the life of me I don't understand why this is the case.

@LeHaine
Copy link
Member

LeHaine commented Mar 1, 2024

Thanks @ju-h4. That is strange because you shouldn't have to redefine the dependencies. At least I never ran into that so far. Are you also using a Linux OS? Which IntelliJ version?

@ju-h4
Copy link

ju-h4 commented Mar 1, 2024

@LeHaine : I am using Windows 10 Pro 22H2 and IntelliJ IDEA 2023.3.4 (Community Edition) (Build #IC-233.14475.28)

The crazy thing is, the jvmRun part still worked in the beginning. Then I had the problem with jsRun (see other issue here in the repo) and then tried everything possible and also upgraded IntelliJ from 2022.x to the current one and I guess since then the jvmRun part didn't work anymore :(

@LeHaine
Copy link
Member

LeHaine commented Mar 2, 2024

I updated to 2023.3.4 from 2023.3.2 and was receiving a ClassNotFound exception when running the jvm SampleGame. I removed the previous run configurations and then cleaned the build and then ran it on the jvm from the class file and it seemed to run finally.

@ju-h4
Copy link

ju-h4 commented Mar 3, 2024

@LeHaine: Thank you, removing all run configurations and running gradle clean did the trick!

@curvedinf
Copy link
Author

curvedinf commented Mar 5, 2024 via email

@LeHaine
Copy link
Member

LeHaine commented Mar 5, 2024

@curvedinf In the drop-down menu in the toolbar where you select your run configuration (next to the green run button). If you select edit configurations from that menu, a dialog should pop up. You can select your existing run configurations and hit the delete button (it's a '-' symbol). Then hit OK. Clean the project with gradle clean and then run your desired app again on the jvm.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants