私はlibgdxとAndroidスタジオを使用しています。私は正常にgoogleプレーゲームサービス(リーダーボードなど)を実装しています。今はadmobを実装したいが、エラーが出る。AdMobとGoogle Playゲームサービスを同時に使用するとエラーが発生する
これは私のbuild.gradleの一部です:私はビルド - >クリーンプロジェクトを押すと、すべてが罰金だ
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-games:11.2.0'
compile 'com.google.android.gms:play-services-ads:11.2.0'
//compile 'com.google.android.gms:play-services:10.0.1'
compile fileTree(dir: '../libs', include: '*.jar')
compile project(":BaseGameUtils")
}
}
が、私は私のアンドロイド携帯電話上でアプリケーションを実行する場合、私はこのエラーを取得する:
Error:Execution failed for task
':android:transformClassesWithJarMergingForRelease'.
> com.android.build.api.transform.TransformException:
java.util.zip.ZipException: duplicate entry:
com/google/android/gms/internal/zzqv.class
それは物事を台無しにcompile 'com.google.android.gms:play-services-ads:11.2.0'
一部です。その行を削除しても、以前と同じように動作しますが、AdMobを使用することはできません。
誰かが問題の原因を知っていますか?
私はEclipseを使用していたときにgoogle-play-serviceライブラリをプロジェクトとして追加し、build.gradleに何も追加する必要はありませんでした...なぜAndroidStudiosではどう違うのですか?
libs' '内部で何ですか? – Aryan
'tween-engine-api.jar'と' tween-engine-api-sources.jar'です。そして私のandroid/libsにはlibgdx関連のものしかありません。 – lijas