IntelliJ找不到任何LibGDX软件包? [英] IntelliJ can't find any LibGDX packages?

查看:192
本文介绍了IntelliJ找不到任何LibGDX软件包?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我刚刚切换到Ubuntu,并且安装了IntelliJ IDEA 14社区版。当我导入我的现有项目时,我发现IntelliJ似乎无法找到任何LibGDX依赖项。我事先安装了Gradle。我试过用IntelliJ项目中包含的Gradle包装来说 ./ gradlew --refresh-dependencies ,但这似乎没有做任何事情。我的外部TweenEngine包加载得很好。它似乎只与IntelliJ遇到的LibGDX软件包有关。我不希望IntelliJ将我的项目视为Gradle项目,因为它必须同步。我更喜欢在这方面自己做事。



我的猜测是Gradle没有安装LibGDX依赖项,但我不完全确定为什么会发生这种情况。不应该 ./ gradlew --refresh-dependencies 安装它们?我得到的错误与这一个完全一样,只是包名和行号不同: ,24)java:package com.badlogic.gdx不存在

行号与我的LibGDX相关class import,所以这就是我认为Gradle没有安装依赖关系的原因。



当我导入项目时,我选择了build.gradle文件。我有local.properties文件指向一个有效的Android SDK。



如果您想要详细了解该项目并希望获得比我提供的更多详细信息,请放心检查出源代码: http://bitbucket.org/Sonic2kk/mr.-ballguy/

有什么可能导致这些错误,我该如何纠正它们?

尝试安装android sdk。如果这不起作用,请尝试重新安装IntelliJ。



另外,请尝试将IntelliJ项目链接到IntelliJ的Gradle插件。

I have just switched to Ubuntu and I've installed IntelliJ IDEA 14 Community Edition. When I imported my existing project, I found that IntelliJ can't seem to find any of the LibGDX dependencies. I installed Gradle beforehand. I've tried using the Gradle wrapper included with the IntelliJ project to and saying ./gradlew --refresh-dependencies, but this doesn't seem to do much of anything. My external TweenEngine packages were loaded just fine. It seems to only be with the LibGDX packages that IntelliJ is having a problem with. I do not wish to have IntelliJ see my project as a Gradle Project, as then it will have to sync. I prefer to do things myself in that regard.

My guess is that Gradle isn't installing the LibGDX dependencies, but I'm not entirely sure why that would be happening. Shouldn't ./gradlew --refresh-dependencies install them? The errors I get are all the same as this one, just with different package names and different line numbers:

Error:(7, 24) java: package com.badlogic.gdx does not exist

The line numbers correlate to my LibGDX class imports, so this is what leads me to believe that Gradle is not installing the dependencies.

When I imported the project, I selected the build.gradle file. I have the local.properties file pointing to a valid Android SDK.

If you want a specific look at the project and would like more detail than I have provided, feel free to check out the source code: http://bitbucket.org/Sonic2kk/mr.-ballguy/

What could be causing these errors and how can I correct them?

解决方案

Try installing the android sdk. If that doesn't work, try reinstalling IntelliJ.

Also, try linking your IntelliJ project to IntelliJ's Gradle plugin.

这篇关于IntelliJ找不到任何LibGDX软件包?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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