前提・実現したいこと
Appのbuild.gradleで以下のように波線がでます。
ビルド自体は通りますが、ランタイムクラッシュにつながる可能性もあると書かれているので解決したいです。
kotlin
1 2apply plugin: 'com.android.application' 3 4apply plugin: 'kotlin-android' 5 6apply plugin: 'kotlin-android-extensions' 7 8android { 9 compileSdkVersion 26 10 defaultConfig { 11 applicationId "jp.co.iwatsu.connectviewgo" 12 minSdkVersion 16 13 targetSdkVersion 26 14 versionCode 1 15 versionName "1.0" 16 testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 17 } 18 buildTypes { 19 release { 20 minifyEnabled false 21 proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 22 } 23 } 24 buildToolsVersion '26.0.2' 25} 26 27dependencies { 28 implementation fileTree(include: ['*.jar'], dir: 'libs') 29 implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version" 30 implementation 'com.android.support:appcompat-v7:26.1.0' 31 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ 32 implementation 'com.android.support.constraint:constraint-layout:1.0.2' 33 implementation 'com.android.support:design:26.1.0' 34 testImplementation 'junit:junit:4.12' 35 androidTestImplementation 'com.android.support.test:runner:1.0.1' 36 androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1' 37 implementation 'com.github.bumptech.glide:glide:4.4.0' 38 kapt 'com.github.bumptech.glide:compiler:4.4.0' 39}
発生している問題・エラーメッセージ
エラーメッセージ All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 27.0.2, 26.1.0. Examples include com.android.support:support-compat:27.0.2 and com.android.support:animated-vector-drawable:26.1.0 縮小... (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.)
補足情報(FW/ツールのバージョンなど)
Android Studio 3.0.1
gradle 3.0.1
kotlin 1.2.30
解決法
Appのbuild.gradleを以下のように変更しました。
dependencies { implementation fileTree(include: ['*.jar'], dir: 'libs') implementation "org.jetbrains.kotlin:kotlin-stdlib-jre7:$kotlin_version" // glideのimplementationを変更 implementation('com.github.bumptech.glide:glide:4.4.0') { exclude group: "com.android.support" } // glideが使用するsupport libraryのバージョンが27のようなので変更 implementation 'com.android.support:support-v4:27.1.0' implementation 'com.android.support.constraint:constraint-layout:1.0.2' // glideが使用するsupport libraryのバージョンが27のようなので変更 implementation 'com.android.support:design:27.1.0' testImplementation 'junit:junit:4.12' androidTestImplementation 'com.android.support.test:runner:1.0.1' androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1' kapt 'com.github.bumptech.glide:compiler:4.4.0' }
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2018/03/14 06:41