how to import Universal tween engine in IntelliJ w

2019-04-16 07:33发布

okay.. I'm trying to create a splash screen for my mobile game. im using lib gdx library to create my game. i have a problem with importing the universal tween engine for my sprite splash. what should I do.

I've downloaded the universal tween engine and extracted it in the "libs" folder in the ios, android, core, and root of my project.. and i copied and paste these lines for each dependencies:

project(":core") {

fileTree(dir: 'D:/game/core/libs', include: 'tween-engine-api.jar')

compile fileTree(dir: 'D:/game/core/libs', include: 'tween-engine-api->sources.jar')

project(":desktop") {

compile fileTree(dir: 'D:/game/desktop/libs', include: 'tween-engine-api.jar')

compile fileTree(dir: 'D:/game/desktop/libs', include: 'tween-engine-api->sources.jar')

project(":ios") {

compile fileTree(dir: 'D:/game/ios/libs', include: 'tween-engine-api.jar')

compile fileTree(dir: 'D:/game/ios/libs', include: 'tween-engine-api->sources.jar')

project(":android") {

compile fileTree(dir: 'D:/game/android/libs', include: 'tween-engine-api.jar')

compile fileTree(dir: 'D:/game/android/libs', include: 'tween-engine-api->sources.jar')

the code in my Spite accessor class :

   package com.game.test;

   import aurelienribon.tweenengine.TweenAccessor;

   public class SpriteAccessor implements TweenAccessor{

   }

the error:

  1. Error:(3, 33) java: package aurelienribon.tweenengine does not exist

  2. Error:(5, 40) java: cannot find symbol symbol: class TweenAccessor

P.S.

Im following a video tutorial by dermetfan and I also put in th terminal these lines:

gradlew --refresh-dependencies

1条回答
Luminary・发光体
2楼-- · 2019-04-16 07:55

LibGdx uses gradle for dependency management.

You can inject dependency from repository. add these lines in your core module of root build.gradle file.

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

compile 'com.github.arcnor:universal-tween-engine:6.3.4'
compile 'com.github.arcnor:universal-tween-engine:6.3.4:sources'
查看更多
登录 后发表回答