IntelliJ找不到任何LibGDX软件包?

编程入门 行业动态 更新时间:2024-10-19 06:21:07
本文介绍了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。

如果您想要详细了解该项目并希望获得比我提供的更多详细信息,请放心检查出源代码: bitbucket/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: bitbucket/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软件包?

本文发布于:2023-07-04 17:17:46,感谢您对本站的认可!
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:找不到   软件包   IntelliJ   LibGDX

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!