如何在IntelliJ中导入Gradle项目? [英] How to import Gradle Projects in IntelliJ?

查看:126
本文介绍了如何在IntelliJ中导入Gradle项目?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用libGDX的时间较长,现在重新安装后,我想将其与Gradle一起使用.

I used libGDX for an longer time and now after an reinstallation I want to use it with Gradle.

我下载了setup.jar并使用它创建了一个项目,如所述这里.我将其导入IntelliJ,并为核心软件包设置了对graddle_wrapper的依赖关系,并为第二个软件包"desktop"设置了对核心的依赖关系. 我运行build.gradle,没有问题.

I downloaded the setup.jar and created an project with it like described here. I imported that into IntelliJ and setted for the core Package the dependency to graddle_wrapper and for the 2nd Package "desktop" to core. I run build.gradle, without problems.

但是,IntelliJ仍然无法识别libGDX软件包-它们是红色的.

But still, IntelliJ is not able to recognise the libGDX Packages - they are red.

要使libGDX运行,我还需要做什么? (或任何其他使用Gradle的项目)

What do I have todo else in order to get libGDX running? (Or any other Project with Gradle)

推荐答案

执行Import ProjectOpen...并导航到build.gradle文件.这足以让IntelliJ找出依赖关系并设置项目.

Do an Import Project or Open... and navigate to build.gradle file. This should be enough for IntelliJ to figure out the dependencies and set up the project.

这篇关于如何在IntelliJ中导入Gradle项目?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆