2018년 10월 26일 최신 android studio, fcm 을 적용했는데 gradle에서 다음과 같은 에러 발생
fcm 추가한 사항
project
classpath 'com.google.gms:google-services:4.0.1'
app
implementation 'com.google.firebase:firebase-core:16.0.1'
apply plugin: 'com.google.gms.google-services'
에러 메시지
All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 28.0.0, 26.1.0. Examples
include com.android.support:animated-vector-drawable:28.0.0 and com.android.support:support-media-compat:26.1.0 less... (Ctrl+F1)
There are some combinations of libraries, or tools and libraries, that are incompatible, or can lead to bugs. One such incompatibility is compiling with a version of the Android support libraries that is not the latest version (or in particular, a version lower than your targetSdkVersion). Issue id: GradleCompatible
라이브러리
< Android API 28 Platform >
< 1.8 >
Gradle: android.arch.core:common:1.1.1@jar
Gradle: android.arch.core:runtime-1.1.1
Gradle: android.arch.lifecycle:common:1.1.1@jar
Gradle: android.arch.lifecycle:livedata-1.1.1
Gradle: android.arch.lifecycle:livedata-core-1.1.1
Gradle: android.arch.lifecycle:runtime-1.1.1
Gradle: android.arch.lifecycle:viewmodel-1.1.1
Gradle: com.android.support.constraint:constraint-layout-1.1.3
Gradle: com.android.support.constraint:constraint-layout-solver:1.1.3@jar
Gradle: com.android.support.test.espresso:espresso-core-3.0.2
Gradle: com.android.support.test.espresso:espresso-idling-resource-3.0.2
Gradle: com.android.support.test:monitor-1.0.2
Gradle: com.android.support.test:runner-1.0.2
Gradle: com.android.support:animated-vector-drawable-28.0.0
Gradle: com.android.support:appcompat-v7-28.0.0
Gradle: com.android.support:asynclayoutinflater-28.0.0
Gradle: com.android.support:collections:28.0.0@jar
Gradle: com.android.support:coordinatorlayout-28.0.0
Gradle: com.android.support:cursoradapter-28.0.0
Gradle: com.android.support:customview-28.0.0
Gradle: com.android.support:documentfile-28.0.0
Gradle: com.android.support:drawerlayout-28.0.0
Gradle: com.android.support:interpolator-28.0.0
Gradle: com.android.support:loader-28.0.0
Gradle: com.android.support:localbroadcastmanager-28.0.0
Gradle: com.android.support:print-28.0.0
Gradle: com.android.support:slidingpanelayout-28.0.0
Gradle: com.android.support:support-annotations:28.0.0@jar
Gradle: com.android.support:support-compat-28.0.0
Gradle: com.android.support:support-core-ui-28.0.0
Gradle: com.android.support:support-core-utils-28.0.0
Gradle: com.android.support:support-fragment-28.0.0
Gradle: com.android.support:support-media-compat-26.1.0
Gradle: com.android.support:support-v4-26.1.0
Gradle: com.android.support:support-vector-drawable-28.0.0
Gradle: com.android.support:swiperefreshlayout-28.0.0
Gradle: com.android.support:versionedparcelable-28.0.0
Gradle: com.android.support:viewpager-28.0.0
Gradle: com.google.android.gms:play-services-ads-identifier-15.0.1
Gradle: com.google.android.gms:play-services-base-15.0.1
Gradle: com.google.android.gms:play-services-basement-15.0.1
Gradle: com.google.android.gms:play-services-measurement-base-16.0.0
Gradle: com.google.android.gms:play-services-stats-15.0.1
Gradle: com.google.android.gms:play-services-tasks-15.0.1
Gradle: com.google.code.findbugs:jsr305:2.0.1@jar
Gradle: com.google.firebase:firebase-analytics-16.0.1
Gradle: com.google.firebase:firebase-analytics-impl-16.1.1
Gradle: com.google.firebase:firebase-common-16.0.0
Gradle: com.google.firebase:firebase-core-16.0.1
Gradle: com.google.firebase:firebase-iid-16.0.0
Gradle: com.google.firebase:firebase-iid-interop-16.0.0
Gradle: com.google.firebase:firebase-measurement-connector-16.0.0
Gradle: com.google.firebase:firebase-measurement-connector-impl-16.0.1
Gradle: com.squareup:javawriter:2.1.1@jar
Gradle: javax.inject:javax.inject:1@jar
Gradle: junit:junit:4.12@jar
Gradle: net.sf.kxml:kxml2:2.3.0@jar
Gradle: org.hamcrest:hamcrest-core:1.3@jar
Gradle: org.hamcrest:hamcrest-integration:1.3@jar
Gradle: org.hamcrest:hamcrest-library:1.3@jar
해결: 문제되는 라이브러리를 제거한다.
implementation ('com.google.firebase:firebase-core:16.0.1'){
exclude group: "com.android.support", module: "support-v4"
exclude group: "com.android.support", module: "support-media-compat"
}
// FirebaseMessagingService 를 사용하기 위해 아래 코드도 추가 필요.
implementation ('com.google.firebase:firebase-messaging:17.3.3'){
exclude group: "com.android.support", module: "support-v4"
exclude group: "com.android.support", module: "support-media-compat"
}
'웹 > android' 카테고리의 다른 글
emulator-5554 offline (0) | 2018.10.26 |
---|