作者:书友70518356 | 来源:互联网 | 2023-05-28 14:37
我创建了新的libgdx项目,我想在Android Studio中运行桌面应用程序.是否与运行配置有关?在Eclipse中,我可以选择Run as Java Application.
1> nikoliazekte..:
好的,我做到了.这是解决方案https://github.com/libgdx/libgdx/wiki/Gradle-and-Intellij-IDEA#running-your-project
Run -> Edit Configurations...
,单击加号(+
)按钮,然后选择"应用程序".
将名称设置为Desktop
.
将字段设置Use classpath of module
为desktop
,然后单击该Main class
字段的按钮并选择DesktopLauncher
该类.
设置Working directory
为您的android/assets/
(或your_project_path/core/assets/
)文件夹!
单击Apply
然后OK
.
您现在已经为桌面项目创建了运行配置.您现在可以选择配置并运行它.