# How do I add the "tween-engine-api" to my libGDX game?

I finished now my first game at LibGDX (I am using Eclipse). I run the game in the desktop launcher and it works. I now want to run my game on Android and iOS.

From some guides I have read, I understand that for running the game on devices I must have the tween-engine library in my project. I tried but couldn't add it to my project.

Can someone help me? (I already tried to do that at "add jars", but it only shows me my project and not the tween-engine library)

• did you mean libGDX in your title and misspelled it? Nov 23 '15 at 8:57

Here's how I get the tween engine in all my games (assuming you're talking about Aurelien Ribon's Universal Tween Engine here: http://www.aurelienribon.com/blog/projects/universal-tween-engine/)

Create a new folder in the project root named libs/ and copy the two tween engine api jars into this directory (tween-engine-api.jar and tween-engine-api-sources.jar)

Add the following line to the root level build.gradle in the 'dependencies' sections in each of the following projects: core, android, and ios

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

Update April 2020

Tween engine is now available from Maven central, so rather than copying the jars manually it should be possible to add the following to build.gradle rather than compile fileTree(...) as described above:

implementation "org.mini2Dx:universal-tween-engine:6.3.3"


(note that this uses the newer Gradle configuration implementation instead of compile, which is deprecated)

Finally, if you want the tween engine to work in the HTML build as well, you have to add the following line to both the GdxDefinition.gwt.xml and GdxDefinitionSuperDev.gwt.xml files in the html project (under html/src/com.things.stuff/):

<inherits name='aurelienribon.tweenengine' />


You'll probably have to do a gradle refresh after this to update everything in your IDE. This has worked for all my games using IntelliJ, and since it is all using gradle I imagine it would work just fine in Eclipse too.

Good luck!

Edit: Looks like you may also have to right-click those two tween engine api jars and choose 'Add to build path' in Eclipse (based on the answer here)