Libgdx Spiel stürzt auf Android ab

Ich habe ein Spiel mit libgdx erstellt und es läuft sowohl auf dem Desktop als auch auf Android einwandfrei. Ich bin mir nicht sicher, ob es daran liegt, dass ich Box2D-Physik-Engine und flüssige Partikel verwendet habe. Wenn ich auf "Spiel starten" klicke, wird das Spiel geladen. Nach dem Laden sollte es auf den Spielebildschirm gehen, aber es stürzt ab und sagt "Leider" , myGame hat aufgehört ".

Fehlermeldung

E/AndroidRuntime: FATAL EXCEPTION: GLThread 3764
Process: com.nivekbryan.puffypuff, PID: 8416
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/badlogic/gdx/physics/box2d/World;

Ich bin diesem @ gefolsetup tutorial Wie man eine Liquidfun-Bibliothek portiert, ist seit 2014 ein bisschen alt. Das Spiel läuft Ok als Desktop-Anwendung.

Dies ist meine build.gradle-Datei (Abhängigkeiten), was könnte das Problem sein? und warum arbeitet man als desktop-anwendung und nicht als android-anwendung?

buildscript {
    repositories {
        mavenLocal()
        mavenCentral()
        maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
        jcenter()
    }
    dependencies {
        classpath 'de.richsource.gradle.plugins:gwt-gradle-plugin:0.6'
        classpath 'com.android.tools.build:gradle:2.0.0'
        classpath 'com.mobidevelop.robovm:robovm-gradle-plugin:2.1.0'
    }
}

allprojects {
    apply plugin: "eclipse"
    apply plugin: "idea"

    version = '1.0'
    ext {
        appName = "Puffy Puff"
        gdxVersion = '1.9.3'
        roboVMVersion = '2.1.0'
        box2DLightsVersion = '1.4'
        ashleyVersion = '1.7.0'
        aiVersion = '1.8.0'
        admobVersion = '8.3.0'
    }

    repositories {
        mavenLocal()
        mavenCentral()
        maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
        maven { url "https://oss.sonatype.org/content/repositories/releases/" }
    }
}

project(":desktop") {
    apply plugin: "java"


    dependencies {
        compile project(":core")
        compile "com.badlogicgames.gdx:gdx-backend-lwjgl:$gdxVersion"
        compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-desktop"

        compile "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-desktop"
        compile fileTree(dir: 'libs', include: '*.jar')
    }
}

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-armeabi"
        natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-armeabi-v7a"
        natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-arm64-v8a"
        natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86"
        natives "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-x86_64"

        compile "com.badlogicgames.gdx:gdx-freetype:$gdxVersion"
        natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-armeabi"
        natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-armeabi-v7a"
        natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-arm64-v8a"
        natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-x86"
        natives "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-x86_64"
        compile "com.google.android.gms:play-services-ads:8.3.0"
        compile fileTree(dir: 'libs', include: '*.so')
    }
}

project(":ios") {
    apply plugin: "java"
    apply plugin: "robovm"


    dependencies {
        compile project(":core")
        compile "com.mobidevelop.robovm:robovm-rt:$roboVMVersion"
        compile "com.mobidevelop.robovm:robovm-cocoatouch:$roboVMVersion"
        compile "com.badlogicgames.gdx:gdx-backend-robovm:$gdxVersion"
        compile "com.badlogicgames.gdx:gdx-platform:$gdxVersion:natives-ios"

        compile "com.badlogicgames.gdx:gdx-freetype-platform:$gdxVersion:natives-ios"
    }
}

project(":html") {
    apply plugin: "gwt"
    apply plugin: "war"


    dependencies {
        compile project(":core")
        compile "com.badlogicgames.gdx:gdx-backend-gwt:$gdxVersion"
        compile "com.badlogicgames.gdx:gdx:$gdxVersion:sources"
        compile "com.badlogicgames.gdx:gdx-backend-gwt:$gdxVersion:sources"
    }
}

project(":core") {
    apply plugin: "java"


    dependencies {
        compile "com.badlogicgames.gdx:gdx:$gdxVersion"

        compile "com.badlogicgames.gdx:gdx-freetype:$gdxVersion"
        compile fileTree(dir: 'libs', include: '*.jar')
    }
}

tasks.eclipse.doLast {
    delete ".project"
}

AKTUALISIEREN

Ich habe diese Lösung gefundenVerknüpfun Also habe ich gdx-liquidfun.jar nach Android kopiert -> libs dann mit der rechten Maustaste klicken und als Bibliothek hinzufügen, aber ich bekomme immer noch den Fehler. Helfen Sie bitte, danke im Voraus (ich verwende Intellij Community Edition)

Antworten auf die Frage(2)

Ihre Antwort auf die Frage