У меня есть Android Studio 3.3.2, и моя цель - импортировать библиотеку GraphView, но оказалось, что она выдала мне ошибку, что все библиотеки должны иметь одинаковую спецификацию версии, я представляю изображение ошибки
Информация всплывающей подсказки об ошибке
All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 28.0.0, 27.1.1. Examples include com.android.support:animated-vector-drawable:28.0.0 and com.android.support:support-media-compat:27.1.1 less... (Ctrl+F1) Inspection info: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
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.mrl.fredy.estadistica"
minSdkVersion 18
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.jjoe64:graphview:4.2.2'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
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'
}
Извините, это град, вы абсолютно правы
Вместо этого
compileSdkVersion 28
targetSdkVersion 28
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
Использовать
compileSdkVersion 27
targetSdkVersion 27
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:design:27.1.1'
Версия библиотеки поддержки библиотеки GraphView — 27.
так что вы можете понизить версию вашей библиотеки. если вы не хотите понижать версию, импортируйте GraphView как модуль и в файле build.gradle измените на compileSdkVersion 28 и targetSdkVersion 28
танк вам, идеальное решение
это головка или
Gradleв названии?