/ / Android libgdx i Google Game Services zakończone 2-java, android, android-studio, libgdx, google-play-services

Android libgdx i Google Game Services zakończyły się 2 - java, android, android-studio, libgdx, google-play-services

W porządku, pracuję nad tym od prawietydzień i robi się irytujący. Mój projekt cały czas kompiluje się w trybie pulpitu, wersja na Androida działa dobrze, dopóki nie zacznę integrować usług Google Play. Rozumiem, że to gdzieś duplikat, próbowałem usunąć kompilację i przerobić ją, wypróbowałem różne inne rozwiązania, ale bezskutecznie. Oto mój plik kompilacji stopni. Zawarłem GameHelper jako klasę w moim module.

buildscript {
repositories {
mavenCentral()
maven { url "https://oss.sonatype.org/content/repositories/snapshots/" }
}
dependencies {
classpath "com.android.tools.build:gradle:1.2.3"
}
}

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

version = "1.0"
ext {
appName = "Collide_5"
gdxVersion = "1.7.0"
roboVMVersion = "1.8.0"
box2DLightsVersion = "1.4"
ashleyVersion = "1.6.0"
aiVersion = "1.6.0"
}

repositories {
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-box2d-platform:$gdxVersion:natives-desktop"
}
}

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-x86"
compile "com.badlogicgames.gdx:gdx-box2d:$gdxVersion"
natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-armeabi"
natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-armeabi-v7a"
natives "com.badlogicgames.gdx:gdx-box2d-platform:$gdxVersion:natives-x86"
compile "com.google.android.gms:play-services:8.3.0"


}
}

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


dependencies {
compile "com.badlogicgames.gdx:gdx:$gdxVersion"
compile "com.badlogicgames.gdx:gdx-box2d:$gdxVersion"
compile "net.dermetfan.libgdx-utils:libgdx-utils-box2d:0.13.1"
compile "net.dermetfan.libgdx-utils:libgdx-utils:0.13.1"
compile "com.underwaterapps.overlap2druntime:overlap2d-runtime-libgdx:0.1.0"
}
}

tasks.eclipse.doLast {
delete ".project"

Odpowiedzi:

0 dla odpowiedzi № 1

Aby pozbyć się błędu, zacząłem nowyProjekt Libgdx od zera i dodał BasegameUtils (Base) jako projekt biblioteki i NIE dodawał usług gier Google jako zależności, ponieważ jest to zależność w Base. Zrobiłem Base kompilację zależności biblioteki w projekcie Android. Do tej pory jestem w stanie raportować, teraz jedyne, co muszę zrobić, to dodać do projektu, są wymagane indywidualne usługi Google. Do tej pory dodałem interfejs do pakietu podstawowego i zintegrowałem go z moim projektem Android i Desktop. Nadal mam inne problemy, nad którymi pracuję, ale problem awarii dex na kompilacjach Androida zniknął.