why dont i have universal tween engine when setting up LibGDX

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-06 07:40:31

问题


Following a tutorial on setting up A LibGDX project and the tutorial says that in the third party section there should be a Universal Tween Engine. Mines not showing up, is there a way for it to show up? What do i have to download?

Thanks in advance :))


回答1:


The Gdx-setup-new-ui-jar does not come with TweenEngine library. There is another way of adding Universal TweenEngine. Since you are using Gradle now, so it is very easy.

just download the TweenEngine from here https://code.google.com/p/java-universal-tween-engine/downloads/list and paste it in your core/libs android/libs and ios/libs folders.

in build.gradle add this line at the end of dependencies of core, android and ios.

    compile fileTree(dir: 'libs', include: '*.jar')

like this:

    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')
     }
    }

then just clean/build your project and you are good to go.




回答2:


LibGdx uses gradle for dependency management.
You can inject dependency from repository.

repositories {
  maven { url "https://jitpack.io" }
}

add these lines in your core module of root build.gradle file.

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



回答3:


For me changing:

compile fileTree(dir: 'libs', include: '*.jar')

to:

compile fileTree(dir: '../libs/tween-engine-api-6.3.3 2', include: '*.jar')

did the trick. (Obviously your file name may be different (no 2 on the end for example))



来源:https://stackoverflow.com/questions/25083263/why-dont-i-have-universal-tween-engine-when-setting-up-libgdx

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!