Я знаю, что это было задано здесь, как 100 раз, и я проверил подобные вопросы, но все еще не могу решить.
В моем случае Android Studio говорит:
Все библиотеки com.android.support должны использовать одну и ту же спецификацию версий (смешивание версий может привести к сбоям во время выполнения). Найдено версии 28.0.0, 26.1.0. Примеры включают com.android.support:animated-vector-drawable:28.0.0 и com.android.support:support-media-compat:26.1.0
Итак, я проверил дерево зависимостей Gradle:
+--- com.android.support.test:runner:1.0.2
| +--- com.android.support:support-annotations:27.1.1 -> 28.0.0
| +--- com.android.support.test:monitor:1.0.2
| | \--- com.android.support:support-annotations:27.1.1 -> 28.0.0
| +--- junit:junit:4.12
| | \--- org.hamcrest:hamcrest-core:1.3
| \--- net.sf.kxml:kxml2:2.3.0
+--- com.android.support.test.espresso:espresso-core:3.0.2
| +--- com.android.support.test:runner:1.0.2 (*)
| +--- com.android.support.test.espresso:espresso-idling-resource:3.0.2
| +--- com.squareup:javawriter:2.1.1
| +--- javax.inject:javax.inject:1
| +--- org.hamcrest:hamcrest-library:1.3
| | \--- org.hamcrest:hamcrest-core:1.3
| +--- org.hamcrest:hamcrest-integration:1.3
| | \--- org.hamcrest:hamcrest-library:1.3 (*)
| \--- com.google.code.findbugs:jsr305:2.0.1
+--- com.android.support.test:runner:{strictly 1.0.2} -> 1.0.2 (c)
+--- com.android.support:support-annotations:{strictly 28.0.0} -> 28.0.0 (c)
+--- com.android.support.test:monitor:{strictly 1.0.2} -> 1.0.2 (c)
+--- junit:junit:{strictly 4.12} -> 4.12 (c)
+--- org.hamcrest:hamcrest-core:{strictly 1.3} -> 1.3 (c)
+--- net.sf.kxml:kxml2:{strictly 2.3.0} -> 2.3.0 (c)
+--- com.android.support.test.espresso:espresso-core:{strictly 3.0.2} -> 3.0.2 (c)
+--- com.android.support.test.espresso:espresso-idling-resource:{strictly 3.0.2} -> 3.0.2 (c)
+--- com.squareup:javawriter:{strictly 2.1.1} -> 2.1.1 (c)
+--- javax.inject:javax.inject:{strictly 1} -> 1 (c)
+--- org.hamcrest:hamcrest-library:{strictly 1.3} -> 1.3 (c)
+--- org.hamcrest:hamcrest-integration:{strictly 1.3} -> 1.3 (c)
+--- com.google.code.findbugs:jsr305:{strictly 2.0.1} -> 2.0.1 (c)
+--- com.android.support:appcompat-v7:{strictly 28.0.0} -> 28.0.0 (c)
+--- com.android.support:support-compat:{strictly 28.0.0} -> 28.0.0 (c)
+--- com.android.support:collections:{strictly 28.0.0} -> 28.0.0 (c)
+--- android.arch.lifecycle:runtime:{strictly 1.1.1} -> 1.1.1 (c)
+--- android.arch.lifecycle:common:{strictly 1.1.1} -> 1.1.1 (c)
+--- android.arch.core:common:{strictly 1.1.1} -> 1.1.1 (c)
+--- com.android.support:versionedparcelable:{strictly 28.0.0} -> 28.0.0 (c)
+--- com.android.support:cursoradapter:{strictly 28.0.0} -> 28.0.0 (c)
+--- com.android.support:support-core-utils:{strictly 28.0.0} -> 28.0.0 (c)
+--- com.android.support:documentfile:{strictly 28.0.0} -> 28.0.0 (c)
+--- com.android.support:loader:{strictly 28.0.0} -> 28.0.0 (c)
+--- android.arch.lifecycle:livedata:{strictly 1.1.1} -> 1.1.1 (c)
+--- android.arch.core:runtime:{strictly 1.1.1} -> 1.1.1 (c)
+--- android.arch.lifecycle:livedata-core:{strictly 1.1.1} -> 1.1.1 (c)
+--- android.arch.lifecycle:viewmodel:{strictly 1.1.1} -> 1.1.1 (c)
+--- com.android.support:localbroadcastmanager:{strictly 28.0.0} -> 28.0.0 (c)
+--- com.android.support:print:{strictly 28.0.0} -> 28.0.0 (c)
+--- com.android.support:support-fragment:{strictly 28.0.0} -> 28.0.0 (c)
+--- com.android.support:support-core-ui:{strictly 28.0.0} -> 28.0.0 (c)
+--- com.android.support:customview:{strictly 28.0.0} -> 28.0.0 (c)
+--- com.android.support:viewpager:{strictly 28.0.0} -> 28.0.0 (c)
+--- com.android.support:coordinatorlayout:{strictly 28.0.0} -> 28.0.0 (c)
+--- com.android.support:drawerlayout:{strictly 28.0.0} -> 28.0.0 (c)
+--- com.android.support:slidingpanelayout:{strictly 28.0.0} -> 28.0.0 (c)
+--- com.android.support:interpolator:{strictly 28.0.0} -> 28.0.0 (c)
+--- com.android.support:swiperefreshlayout:{strictly 28.0.0} -> 28.0.0 (c)
+--- com.android.support:asynclayoutinflater:{strictly 28.0.0} -> 28.0.0 (c)
+--- com.android.support:support-vector-drawable:{strictly 28.0.0} -> 28.0.0 (c)
+--- com.android.support:animated-vector-drawable:{strictly 28.0.0} -> 28.0.0 (c)
+--- android.arch.persistence.room:runtime:{strictly 1.1.1} -> 1.1.1 (c)
+--- android.arch.persistence.room:common:{strictly 1.1.1} -> 1.1.1 (c)
+--- android.arch.persistence:db-framework:{strictly 1.1.1} -> 1.1.1 (c)
+--- android.arch.persistence:db:{strictly 1.1.1} -> 1.1.1 (c)
+--- com.nostra13.universalimageloader:universal-image-loader:{strictly 1.9.5} -> 1.9.5 (c)
+--- org.jetbrains:annotations-java5:{strictly 15.0} -> 15.0 (c)
+--- pub.devrel:easypermissions:{strictly 2.0.1} -> 2.0.1 (c)
+--- org.locationtech.jts:jts:{strictly 1.16.1} -> 1.16.1 (c)
+--- com.mapbox.mapboxsdk:mapbox-android-navigation:{strictly 0.34.0} -> 0.34.0 (c)
+--- com.mapbox.mapboxsdk:mapbox-sdk-services:{strictly 4.5.0} -> 4.5.0 (c)
+--- com.mapbox.mapboxsdk:mapbox-sdk-core:{strictly 4.5.0} -> 4.5.0 (c)
+--- com.google.code.gson:gson:{strictly 2.8.5} -> 2.8.5 (c)
+--- com.squareup.retrofit2:retrofit:{strictly 2.4.0} -> 2.4.0 (c)
+--- com.squareup.okhttp3:okhttp:{strictly 3.14.1} -> 3.14.1 (c)
+--- com.squareup.okio:okio:{strictly 1.17.2} -> 1.17.2 (c)
+--- com.squareup.retrofit2:converter-gson:{strictly 2.4.0} -> 2.4.0 (c)
+--- com.squareup.okhttp3:logging-interceptor:{strictly 3.11.0} -> 3.11.0 (c)
+--- com.mapbox.mapboxsdk:mapbox-sdk-geojson:{strictly 4.5.0} -> 4.5.0 (c)
+--- com.mapbox.mapboxsdk:mapbox-sdk-turf:{strictly 4.5.0} -> 4.5.0 (c)
+--- com.mapbox.mapboxsdk:mapbox-android-core:{strictly 1.2.0} -> 1.2.0 (c)
+--- com.mapbox.mapboxsdk:mapbox-android-telemetry:{strictly 4.2.0} -> 4.2.0 (c)
+--- android.arch.lifecycle:extensions:{strictly 1.1.0} -> 1.1.0 (c)
+--- com.mapbox.navigator:mapbox-navigation-native:{strictly 6.1.0} -> 6.1.0 (c)
+--- com.jakewharton.timber:timber:{strictly 4.7.1} -> 4.7.1 (c)
+--- com.google.android.gms:play-services-location:{strictly 16.0.0} -> 16.0.0 (c)
+--- com.google.android.gms:play-services-base:{strictly 16.0.1} -> 16.0.1 (c)
+--- com.google.android.gms:play-services-basement:{strictly 16.0.1} -> 16.0.1 (c)
+--- com.android.support:support-v4:{strictly 26.1.0} -> 26.1.0 (c)
+--- com.android.support:support-media-compat:{strictly 26.1.0} -> 26.1.0 (c)
+--- com.google.android.gms:play-services-tasks:{strictly 16.0.1} -> 16.0.1 (c)
+--- com.google.android.gms:play-services-places-placereport:{strictly 16.0.0} -> 16.0.0 (c)
+--- com.android.support:appcompat-v7:28.0.0
| +--- com.android.support:support-annotations:28.0.0
| +--- com.android.support:support-compat:28.0.0
| | +--- com.android.support:support-annotations:28.0.0
| | +--- com.android.support:collections:28.0.0
| | | \--- com.android.support:support-annotations:28.0.0
| | +--- android.arch.lifecycle:runtime:1.1.1
| | | +--- android.arch.lifecycle:common:1.1.1
| | | | \--- com.android.support:support-annotations:26.1.0 -> 28.0.0
| | | +--- android.arch.core:common:1.1.1
| | | | \--- com.android.support:support-annotations:26.1.0 -> 28.0.0
| | | \--- com.android.support:support-annotations:26.1.0 -> 28.0.0
| | \--- com.android.support:versionedparcelable:28.0.0
| | +--- com.android.support:support-annotations:28.0.0
| | \--- com.android.support:collections:28.0.0 (*)
| +--- com.android.support:collections:28.0.0 (*)
| +--- com.android.support:cursoradapter:28.0.0
| | \--- com.android.support:support-annotations:28.0.0
| +--- com.android.support:support-core-utils:28.0.0
| | +--- com.android.support:support-annotations:28.0.0
| | +--- com.android.support:support-compat:28.0.0 (*)
| | +--- com.android.support:documentfile:28.0.0
| | | \--- com.android.support:support-annotations:28.0.0
| | +--- com.android.support:loader:28.0.0
| | | +--- com.android.support:support-annotations:28.0.0
| | | +--- com.android.support:support-compat:28.0.0 (*)
| | | +--- android.arch.lifecycle:livedata:1.1.1
| | | | +--- android.arch.core:runtime:1.1.1
| | | | | +--- com.android.support:support-annotations:26.1.0 -> 28.0.0
| | | | | \--- android.arch.core:common:1.1.1 (*)
| | | | +--- android.arch.lifecycle:livedata-core:1.1.1
| | | | | +--- android.arch.lifecycle:common:1.1.1 (*)
| | | | | +--- android.arch.core:common:1.1.1 (*)
| | | | | \--- android.arch.core:runtime:1.1.1 (*)
| | | | \--- android.arch.core:common:1.1.1 (*)
| | | \--- android.arch.lifecycle:viewmodel:1.1.1
| | | \--- com.android.support:support-annotations:26.1.0 -> 28.0.0
| | +--- com.android.support:localbroadcastmanager:28.0.0
| | | \--- com.android.support:support-annotations:28.0.0
| | \--- com.android.support:print:28.0.0
| | \--- com.android.support:support-annotations:28.0.0
| +--- com.android.support:support-fragment:28.0.0
| | +--- com.android.support:support-compat:28.0.0 (*)
| | +--- com.android.support:support-core-ui:28.0.0
| | | +--- com.android.support:support-annotations:28.0.0
| | | +--- com.android.support:support-compat:28.0.0 (*)
| | | +--- com.android.support:support-core-utils:28.0.0 (*)
| | | +--- com.android.support:customview:28.0.0
| | | | +--- com.android.support:support-annotations:28.0.0
| | | | \--- com.android.support:support-compat:28.0.0 (*)
| | | +--- com.android.support:viewpager:28.0.0
| | | | +--- com.android.support:support-annotations:28.0.0
| | | | +--- com.android.support:support-compat:28.0.0 (*)
| | | | \--- com.android.support:customview:28.0.0 (*)
| | | +--- com.android.support:coordinatorlayout:28.0.0
| | | | +--- com.android.support:support-annotations:28.0.0
| | | | +--- com.android.support:support-compat:28.0.0 (*)
| | | | \--- com.android.support:customview:28.0.0 (*)
| | | +--- com.android.support:drawerlayout:28.0.0
| | | | +--- com.android.support:support-annotations:28.0.0
| | | | +--- com.android.support:support-compat:28.0.0 (*)
| | | | \--- com.android.support:customview:28.0.0 (*)
| | | +--- com.android.support:slidingpanelayout:28.0.0
| | | | +--- com.android.support:support-annotations:28.0.0
| | | | +--- com.android.support:support-compat:28.0.0 (*)
| | | | \--- com.android.support:customview:28.0.0 (*)
| | | +--- com.android.support:interpolator:28.0.0
| | | | \--- com.android.support:support-annotations:28.0.0
| | | +--- com.android.support:swiperefreshlayout:28.0.0
| | | | +--- com.android.support:support-annotations:28.0.0
| | | | +--- com.android.support:support-compat:28.0.0 (*)
| | | | \--- com.android.support:interpolator:28.0.0 (*)
| | | +--- com.android.support:asynclayoutinflater:28.0.0
| | | | +--- com.android.support:support-annotations:28.0.0
| | | | \--- com.android.support:support-compat:28.0.0 (*)
| | | \--- com.android.support:cursoradapter:28.0.0 (*)
| | +--- com.android.support:support-core-utils:28.0.0 (*)
| | +--- com.android.support:support-annotations:28.0.0
| | +--- com.android.support:loader:28.0.0 (*)
| | \--- android.arch.lifecycle:viewmodel:1.1.1 (*)
| +--- com.android.support:support-vector-drawable:28.0.0
| | +--- com.android.support:support-annotations:28.0.0
| | \--- com.android.support:support-compat:28.0.0 (*)
| \--- com.android.support:animated-vector-drawable:28.0.0
| +--- com.android.support:support-vector-drawable:28.0.0 (*)
| \--- com.android.support:support-core-ui:28.0.0 (*)
+--- android.arch.persistence.room:runtime:1.1.1
| +--- android.arch.persistence.room:common:1.1.1
| | \--- com.android.support:support-annotations:26.1.0 -> 28.0.0
| +--- android.arch.persistence:db-framework:1.1.1
| | +--- com.android.support:support-annotations:26.1.0 -> 28.0.0
| | \--- android.arch.persistence:db:1.1.1
| | \--- com.android.support:support-annotations:26.1.0 -> 28.0.0
| +--- android.arch.persistence:db:1.1.1 (*)
| +--- android.arch.core:runtime:1.1.1 (*)
| \--- com.android.support:support-core-utils:26.1.0 -> 28.0.0 (*)
+--- com.nostra13.universalimageloader:universal-image-loader:1.9.5
+--- org.jetbrains:annotations-java5:15.0
+--- pub.devrel:easypermissions:2.0.1
| +--- com.android.support:appcompat-v7:28.0.0 (*)
| +--- com.android.support:support-compat:28.0.0 (*)
| \--- com.android.support:support-fragment:28.0.0 (*)
+--- org.locationtech.jts:jts:1.16.1
+--- com.mapbox.mapboxsdk:mapbox-android-navigation:0.34.0
| +--- com.mapbox.mapboxsdk:mapbox-sdk-services:4.5.0
| | +--- com.mapbox.mapboxsdk:mapbox-sdk-core:4.5.0
| | | +--- com.google.code.gson:gson:2.8.5
| | | +--- com.squareup.retrofit2:retrofit:2.4.0
| | | | \--- com.squareup.okhttp3:okhttp:3.10.0 -> 3.14.1
| | | | \--- com.squareup.okio:okio:1.17.2
| | | +--- com.squareup.retrofit2:converter-gson:2.4.0
| | | | +--- com.squareup.retrofit2:retrofit:2.4.0 (*)
| | | | \--- com.google.code.gson:gson:2.8.2 -> 2.8.5
| | | \--- com.squareup.okhttp3:logging-interceptor:3.11.0
| | | \--- com.squareup.okhttp3:okhttp:3.11.0 -> 3.14.1 (*)
| | \--- com.mapbox.mapboxsdk:mapbox-sdk-geojson:4.5.0
| | \--- com.google.code.gson:gson:2.8.5
| +--- com.mapbox.mapboxsdk:mapbox-sdk-turf:4.5.0
| | +--- com.mapbox.mapboxsdk:mapbox-sdk-core:4.5.0 (*)
| | \--- com.mapbox.mapboxsdk:mapbox-sdk-geojson:4.5.0 (*)
| +--- com.mapbox.mapboxsdk:mapbox-android-core:1.2.0
| +--- com.mapbox.mapboxsdk:mapbox-android-telemetry:4.2.0
| | +--- com.squareup.okhttp3:okhttp:3.10.0 -> 3.14.1 (*)
| | +--- com.google.code.gson:gson:2.8.2 -> 2.8.5
| | \--- android.arch.lifecycle:extensions:1.1.0
| | +--- android.arch.lifecycle:runtime:1.1.0 -> 1.1.1 (*)
| | +--- android.arch.core:common:1.1.0 -> 1.1.1 (*)
| | +--- android.arch.core:runtime:1.1.0 -> 1.1.1 (*)
| | +--- com.android.support:support-fragment:26.1.0 -> 28.0.0 (*)
| | +--- android.arch.lifecycle:common:1.1.0 -> 1.1.1 (*)
| | +--- android.arch.lifecycle:livedata:1.1.0 -> 1.1.1 (*)
| | \--- android.arch.lifecycle:viewmodel:1.1.0 -> 1.1.1 (*)
| +--- com.mapbox.navigator:mapbox-navigation-native:6.1.0
| +--- com.android.support:appcompat-v7:28.0.0 (*)
| \--- com.jakewharton.timber:timber:4.7.1
+--- com.squareup.okhttp3:okhttp:3.14.1 (*)
\--- com.google.android.gms:play-services-location:16.0.0
+--- com.google.android.gms:play-services-base:16.0.1
| +--- com.google.android.gms:play-services-basement:16.0.1
| | \--- com.android.support:support-v4:26.1.0
| | +--- com.android.support:support-compat:26.1.0 -> 28.0.0 (*)
| | +--- com.android.support:support-media-compat:26.1.0
| | | +--- com.android.support:support-annotations:26.1.0 -> 28.0.0
| | | \--- com.android.support:support-compat:26.1.0 -> 28.0.0 (*)
| | +--- com.android.support:support-core-utils:26.1.0 -> 28.0.0 (*)
| | +--- com.android.support:support-core-ui:26.1.0 -> 28.0.0 (*)
| | \--- com.android.support:support-fragment:26.1.0 -> 28.0.0 (*)
| \--- com.google.android.gms:play-services-tasks:16.0.1
| \--- com.google.android.gms:play-services-basement:16.0.1 (*)
+--- com.google.android.gms:play-services-basement:16.0.1 (*)
+--- com.google.android.gms:play-services-places-placereport:16.0.0
| \--- com.google.android.gms:play-services-basement:16.0.1 (*)
\--- com.google.android.gms:play-services-tasks:16.0.1 (*)
Я довольно смущен этим выводом. Кажется, что, например, com.android.support.test:runner:1.0.2
требуется com.android.support:support-v4:{strictly 26.1.0}
, но я не смог найти более новую версию, чем 1.0.2
упомянутой библиотеки. Также в то же время необходимо com.android.support:appcompat-v7:{strictly 28.0.0}
. Так что в принципе нужна одна и та же библиотека в двух версиях ?? Я действительно не уверен, что об этом думать, не говоря уже о том, чтобы это исправить. Пожалуйста, помогите : D
Вот мой build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.sanctusmedia.android.WattsUp"
minSdkVersion 21
targetSdkVersion 28
versionCode 1
versionName "0.07"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
compileOptions {
targetCompatibility 1.8
sourceCompatibility 1.8
}
lintOptions {
checkReleaseBuilds false
abortOnError false
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.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 'org.jetbrains:annotations-java5:15.0'
// Room persistence library (https://developer.android.com/training/data-storage/room/index.html#java)
implementation "android.arch.persistence.room:runtime:1.1.1"
annotationProcessor "android.arch.persistence.room:compiler:1.1.1"
// https://github.com/nostra13/Android-Universal-Image-Loader, Apache 2.0 license
implementation 'com.nostra13.universalimageloader:universal-image-loader:1.9.5'
// Easy permissions: https://github.com/googlesamples/easypermissions, Apache 2.0 license
implementation 'pub.devrel:easypermissions:2.0.1'
// JTS Topology Suite - predecessor of GEOS: https://github.com/locationtech/jts, EDL v1.0 license
implementation group: 'org.locationtech.jts', name: 'jts', version: '1.16.1', ext: 'pom'
// MapBox, see: https://www.mapbox.com
implementation 'com.mapbox.mapboxsdk:mapbox-android-navigation:0.34.0'
// OkHTTP, see: https://github.com/square/okhttp, Apache 2.0 license
implementation("com.squareup.okhttp3:okhttp:3.14.1")
// Google Play services for faster GPS lock
implementation 'com.google.android.gms:play-services-location:16.0.0'
}
configurations {
cleanedAnnotations
compile.exclude group: 'org.jetbrains' , module:'annotations'
}