libgdx ClassNotFoundException when starting Desktop main - Mac, IntelliJ

后端 未结 2 384
故里飘歌
故里飘歌 2021-01-12 13:28

I set up my project as described in the IntelliJ setup tutorial, but I am unable to start the Desktop application. The android app starts up fine in both the emulator and on

2条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-12 13:46

    LibGDX 1.7.1, IntelliJ IDEA 15.0, Windows 8.1 -- I kept getting the problem trying to run DesktopLauncher through the IDE's Run Configurations dialogs.

    Instead, running the Gradle task (desktop -> run) works perfectly.

    To run the Gradle task within IntelliJ,

    1. Hit Shift twice, type "Gradle" to open the Gradle projects pane
    2. Hit the "Refresh all Gradle projects" button if nothing is showing up
    3. Expand :desktop > Tasks > other
    4. Double-click "run"

提交回复
热议问题