且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

在Android的Studio中运行Java应用程序

更新时间:2022-05-12 03:27:45

好吧,我做到了。下面是该解决方案的https://github.com/libgdx/libgdx/wiki/Gradle-and-Intellij-IDEA#running-your-project

Ok, i did it. Here is the solution https://github.com/libgdx/libgdx/wiki/Gradle-and-Intellij-IDEA#running-your-project

运行 - >编辑配置... ,点击加号( + )按钮,然后选择应用程序。将名称设置为桌面。设置字段使用模块的类路径桌面,然后点击主要的按钮类字段,然后选择 DesktopLauncher 类。将工作目录安卓/资产/ (或 your_project_path /核心/资产/ )的文件夹!点击应用然后确定。现在,您已经创建了您的桌面项目运行配置。现在,您可以选择配置并运行它。

Run -> Edit Configurations..., click the plus (+) button and select Application. Set the Name to Desktop. Set the field Use classpath of module to desktop, then click on the button of the Main class field and select the DesktopLauncher class. Set the Working directory to your android/assets/ (or your_project_path/core/assets/) folder! Click Apply and then OK. You have now created a run configuration for your desktop project. You can now select the configuration and run it.