어제 내 앱이 잘 작동했습니다.
오늘은 Android Studio를 다시 연 후 앱이 더 이상 컴파일되지 않는 이유를 모르겠습니다.
표시된 오류는
Program type already present: com.google.android.gms.internal.measurement.zzwp
Message{kind=ERROR, text=Program type already present: com.google.android.gms.internal.measurement.zzwp, sources=[Unknown source file], tool name=Optional.of(D8)}
무슨 일이 일어나고 있는지 정말 모르겠습니다. 모든 것을 검색했지만 아무런 효과가 없었습니다. 누군가 나를 도울 수 있다면 정말 감사하겠습니다. 문제를 해결하기 위해 모든 종속성과 라이브러리를 변경했지만 아무것도 작동하지 않았습니다.
다음은 build.gradle 프로젝트입니다.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.1'
classpath 'com.google.gms:google-services:3.2.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
maven { url 'https://jitpack.io' }
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
그리고 이것은 내 build.gradle 모듈입니다.
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.doctordirectory"
minSdkVersion 21
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
repositories {
maven { url "https://jitpack.io" }
}
dependencies {
implementation fileTree(dir: 'libs')
implementation 'com.android.support:appcompat-v7:27.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
implementation 'com.github.PhilJay:MPAndroidChart:v3.0.3'
implementation ('com.facebook.android:audience-network-sdk:4.28.0',{
exclude group: 'com.google.android.gms'
})
implementation 'com.facebook.android:facebook-login:4.32.0'
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.readystatesoftware.sqliteasset:sqliteassethelper:+'
implementation 'com.android.support:support-v4:27.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.google.firebase:firebase-core:15.0.0'
implementation 'com.google.firebase:firebase-database:15.0.0'
implementation 'com.google.firebase:firebase-crash:15.0.0'
implementation 'com.google.firebase:firebase-auth:15.0.0'
implementation 'com.google.firebase:firebase-storage:15.0.0'
implementation 'com.firebaseui:firebase-ui-database:3.3.1'
implementation 'com.google.android.gms:play-services-auth:15.0.0'
implementation 'com.google.android.gms:play-services-plus:15.0.0'
implementation 'com.google.android.gms:play-services-location:15.0.0'
implementation 'com.android.support:cardview-v7:27.1.0'
implementation 'com.android.support:recyclerview-v7:27.1.0'
implementation 'com.squareup.picasso:picasso:2.5.2'
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
implementation 'com.stepstone.apprating:app-rating:2.2.0'
implementation 'com.android.support:design:27.1.0'
implementation 'com.android.support:design:27.1.0'
implementation 'com.github.lguipeng:BubbleView:1.0.1'
implementation 'uk.co.chrisjenx:calligraphy:2.3.0'
implementation 'com.miguelcatalan:materialsearchview:1.4.0'
implementation 'com.github.MdFarhanRaja:SearchableSpinner:1.9'
implementation 'com.github.sillebille:dynamic-calendar:1.0.1'
implementation 'com.google.api-client:google-api-client:1.22.0'
implementation 'com.google.api-client:google-api-client-android:1.22.0'
implementation 'com.google.apis:google-api-services-people:v1-rev4-1.22.0'
}
apply plugin: 'com.google.gms.google-services'