为什么我在设置LibGDX时没有通用的Tween Engine?

3
在设置LibGDX项目的教程中,第三方部分应该有一个通用的Tween引擎。但是我的没有显示出来,有什么方法可以让它显示出来吗?我需要下载什么东西?
提前感谢:))

1
https://github.com/libgdx/libgdx/wiki/Universal-Tween-Engine - Xoppa
3个回答

3
Gdx-setup-new-ui-jar不包含TweenEngine库。添加Universal TweenEngine的另一种方法很简单,因为现在使用Gradle。只需从此处https://code.google.com/p/java-universal-tween-engine/downloads/list下载TweenEngine并将其粘贴到core/libs android/libs和ios/libs文件夹中即可。在build.gradle中,在core、android和ios的dependencies末尾添加此行。
    compile fileTree(dir: 'libs', include: '*.jar')

像这样:
    project(":android") {
    apply plugin: "android"

    configurations { natives }

     dependencies {
      compile project(":core")
      compile "com.badlogicgames.gdx:gdx-backend-android:$gdxVersion"
      natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86"
      natives "com.badlogicgames.gdx:gdx-bullet-platform:$gdxVersion:natives-x86"
      compile fileTree(dir: 'libs', include: '*.jar')
     }
    }

然后只需清理/构建您的项目,就可以开始使用了。

1
LibGdx使用Gradle进行依赖管理。
您可以从存储库中注入依赖项。
repositories {
  maven { url "https://jitpack.io" }
}

将以下几行添加到您的根build.gradle文件的核心模块中。

compile 'com.github.arcnor:universal-tween-engine:6.3.4'
compile 'com.github.arcnor:universal-tween-engine:6.3.4:sources'

0
对我来说,将: compile fileTree(dir: 'libs', include: '*.jar') 改为: compile fileTree(dir: '../libs/tween-engine-api-6.3.3 2', include: '*.jar') 就解决了问题。(显然,你的文件名可能不同(例如末尾没有2))

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接