【发布时间】:2014-07-07 16:24:41
【问题描述】:
我是 Gradle 的新手。我正在尝试将 gdx-tools 添加到我的项目中:
project(":desktop") {
apply plugin: "java"
dependencies {
compile project(":core")
compile "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion"
compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop"
compile "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-desktop"
compile "com.badlogicgames.gdx:gdx-tools:$gdxVersion"
}
}
我打开我的桌面项目,文件夹“Gradle Dependecies”并看到“gdx-tools-1.0.1.jar”。当我尝试打开它时 - 没有显示。
所以,当我尝试使用它时(我想尝试将图像打包到图集) - 我无法导入 com.badlogic.gdx.tools...
我做错了什么?
【问题讨论】:
-
在 Eclipse 中右键单击项目并执行
Gradle -> Refresh dependencies。之后它应该可以工作了。 -
我做到了,现在所有 Dektop Gradle 依赖项都消失了!所有这些都在项目属性 - 库中“缺失”。如何解决?谢谢。
-
对我来说,当我在 Eclipse 上右键单击我的项目文件夹并选择 Gradle > Refresh all
标签: java android gradle libgdx