Приветствую.
Делал проект по видео: https://youtu.be/WOX7fqGKvog Все отлично, компилируется, но при запуске крашится. Runtime-ошибка.
В проекте только 1 строка подчеркнута красным и я думаю что ошибка из-за нее:
compile 'com.android.support:appcompat-v7:25.3.1'
Текст ошибки: All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 25.3.1., 25.0.0., 23.4.0. Example include com.android.support:animated-vector-drawable:25.3.1 and com.android.support:palette-v7:25.0.0.
Полный код build.gradle (app):
/* apply plugin: 'com.android.application'
android {
compileSdkVersion 25
// buildToolsVersion "26.0.1"
buildToolsVersion "25.0.1"
defaultConfig {
applicationId "info.fandroid.firebasechat"
// minSdkVersion 14
minSdkVersion 16
targetSdkVersion 25
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'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
// compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:appcompat-v7:25.0.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
// compile 'com.google.firebase:firebase-messaging:10.0.1'
compile 'com.android.support:design:25.0.1'
compile 'com.firebaseui:firebase-ui:0.6.2'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
*/
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.1"
// buildToolsVersion "25.0.1"
defaultConfig {
applicationId "info.fandroid.firebasechat"
minSdkVersion 16
targetSdkVersion 25
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'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.andoid.support:appcompat-v7:25.3.1'
// compile 'com.android.support:appcompat-v7:25.0.1'
testCompile 'junit:junit:4.12'
//Add Library
compile 'com.android.support:design:25.3.1'
// compile 'com.android.support:design:25.0.1'
compile 'com.firebaseui:firebase-ui:0.6.2'
}
apply plugin: 'com.google.gms.google-services'
Помогите пожалуйста исправить ошибку. Я уже пробовал изменять версии в разных местах, на те, что доступны, но не помогло...
UPD. Вставил оригинальный код с текстовой версии урока, но не помогло:
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.1"
defaultConfig {
applicationId "info.fandroid.firebasechat"
minSdkVersion 16
targetSdkVersion 25
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'])
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
compile 'com.android.support:appcompat-v7:25.0.1'
testCompile 'junit:junit:4.12'
//Add Library
compile 'com.android.support:design:25.0.1'
compile 'com.firebaseui:firebase-ui:0.6.2'
}
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)
А вы используете разные версии:
buildToolsVersion "25.0.1"
compile 'com.andoid.support:appcompat-v7:25.3.1'
И так далее.
Проследите чтобы версии разных библиотек, взятых из com.android.support не отличались, как и описывается в ошибке.
Апостиль в Лос-Анджелесе без лишних нервов и бумажной волокиты
Основные этапы разработки сайта для стоматологической клиники
Продвижение своими сайтами как стратегия роста и независимости