how to import Universal tween engine in IntelliJ with lib gdx

假装没事ソ 提交于 2019-12-21 23:39:40

问题


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:


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'


来源:https://stackoverflow.com/questions/32202798/how-to-import-universal-tween-engine-in-intellij-with-lib-gdx

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