问题描述
好的.. 我正在尝试为我的手机游戏创建启动画面.我使用 lib gdx 库来创建我的游戏.我在为我的精灵飞溅导入通用补间引擎时遇到问题.我该怎么办.
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.
我已经下载了通用补间引擎并将其解压缩到我项目的 ios、android、核心和根目录中的libs"文件夹中.我为每个依赖项复制并粘贴了这些行:
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") {
project(":core") {
fileTree(dir: 'D:/game/core/libs', include: 'tween-engine-api.jar')
fileTree(dir: 'D:/game/core/libs', include: 'tween-engine-api.jar')
编译fileTree(dir: 'D:/game/core/libs', include: 'tween-engine-api->sources.jar')
compile fileTree(dir: 'D:/game/core/libs', include: 'tween-engine-api->sources.jar')
project(":desktop") {
project(":desktop") {
编译fileTree(dir: 'D:/game/desktop/libs', include: 'tween-engine-api.jar')
compile fileTree(dir: 'D:/game/desktop/libs', include: 'tween-engine-api.jar')
编译fileTree(dir: 'D:/game/desktop/libs', include: 'tween-engine-api->sources.jar')
compile fileTree(dir: 'D:/game/desktop/libs', include: 'tween-engine-api->sources.jar')
project(":ios") {
project(":ios") {
编译fileTree(dir: 'D:/game/ios/libs', include: 'tween-engine-api.jar')
compile fileTree(dir: 'D:/game/ios/libs', include: 'tween-engine-api.jar')
编译fileTree(dir: 'D:/game/ios/libs', include: 'tween-engine-api->sources.jar')
compile fileTree(dir: 'D:/game/ios/libs', include: 'tween-engine-api->sources.jar')
project(":android") {
project(":android") {
编译fileTree(dir: 'D:/game/android/libs', include: 'tween-engine-api.jar')
compile fileTree(dir: 'D:/game/android/libs', include: 'tween-engine-api.jar')
编译fileTree(dir: 'D:/game/android/libs', include: 'tween-engine-api->sources.jar')
compile fileTree(dir: 'D:/game/android/libs', include: 'tween-engine-api->sources.jar')
我的 Spite 访问器类中的代码:
the code in my Spite accessor class :
package com.game.test;
import aurelienribon.tweenengine.TweenAccessor;
public class SpriteAccessor implements TweenAccessor{
}
错误:
错误:(3, 33) java: 包 aurelienribon.tweenengine 不存在
Error:(3, 33) java: package aurelienribon.tweenengine does not exist
错误:(5, 40) java: 找不到符号 symbol: class TweenAccessor
Error:(5, 40) java: cannot find symbol symbol: class TweenAccessor
附:
我正在关注 dermetfan 的视频教程,并且我还在终端中输入了以下几行:
Im following a video tutorial by dermetfan and I also put in th terminal these lines:
gradlew --refresh-dependencies
gradlew --refresh-dependencies
推荐答案
LibGdx 使用 gradle 进行依赖管理.
LibGdx uses gradle for dependency management.
您可以从存储库注入依赖项.在根 build.gradle 文件的核心模块中添加这些行.
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'
这篇关于如何使用 lib gdx 在 IntelliJ 中导入通用补间引擎的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持跟版网!