Google 게임 API를 사용하여 내 안드로이드 게임에 리더 보드를 추가했습니다. 이제 Android Studio의 Firebase '마법사'를 사용하여 배너 광고를 추가하고 싶습니다. 그것은 잘 구축,하지만 난이 APK를 만들려고 할 때, 나는 다음과 같은 오류 얻을 : 마법사를 사용하면Google Base 게임을 Firebase와 함께 사용
Error:Error converting bytecode to dex: Cause: com.android.dex.DexException: Multiple dex files define Lcom/google/android/gms/internal/zzqv;
을 내 build.gradle 파일은 다음과 같다 : I 시도
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "xxx"
minSdkVersion 15
targetSdkVersion 22
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'),'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile project(':BaseGameUtils')
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.google.android.gms:play-services-games:10.0.1'
compile 'com.google.firebase:firebase-ads:10.0.1'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
/여러 개의 덱스 파일 문제와 관련된 모든 것을 읽었지만 나에게는 아무런 효과가 없었다. 누구든지 나를위한 힌트를 가지고 있습니까? 리더 보드에도 Firebase를 사용해야합니까? 어떤 도움을/클레이튼 윌킨슨의 의견에 Pettersson이
내가 비슷한 build.gradle 파일을 사용하여 문제를 재현 할 수없는입니다 : –
BaseGameUtils의 gradle 파일을 확인하십시오. 내 생각에 여러 버전의 play-services- *가 포함되어 있습니다. BaseGameUtils는 더 이상 제한된 값을 가지고 있기 때문에 정적 메소드 몇 개를 프로젝트에서 직접 복사 할 수 있습니다. –