これは簡単な質問ですが、stackoverflowで数回答えられましたが、私は初心者であり、すでに回答しているスレッドから実際の解決策を見つけることができません。バージョンを混在させるとランタイムクラッシュが発生する可能性があります
All com.android.support libraries must use the exact same version
specification (mixing versions can lead to runtime crashes). Found versions
26.1.0, 25.3.1, 25.2.0. Examples include `com.android.support:animated-vector
drawable:26.1.0` and `com.android.support:cardview-v7:25.3.1`
アプリは罰金構築し、また、API 22のようないくつかのデバイス上で実行されますが、テストしながら、私はアプリのクラッシュAPI 19と他のいくつかのことを考え出した:私は私のGradle私はこのエラーを取得していますより低いAPI。ここで
は、あなたのtargetSdkVersion
あなたは、Androidのサポートライブラリの同じバージョンを使用する必要があります26に変更を最初に私のGradleファイル
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "26.0.1"
defaultConfig {
applicationId "*******"
minSdkVersion 16
targetSdkVersion 22
versionCode 1
versionName "1.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
packagingOptions {
exclude 'META-INF/LICENSE'
exclude 'META-INF/LICENSE-FIREBASE.txt'
exclude 'META-INF/NOTICE'
}
dexOptions {
javaMaxHeapSize "4g"
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile files('libs/activation.jar')
compile 'com.google.firebase:firebase-database:11.2.2'
compile 'com.google.firebase:firebase-auth:11.2.2'
compile 'com.google.firebase:firebase-storage:11.2.2'
compile 'com.google.android.gms:play-services:11.2.2'
compile 'com.firebase:firebase-client-android:2.3.1'
compile 'com.android.support:appcompat-v7:26.1.0' << Error with this line
compile 'com.android.support.constraint:constraint-layout:+'
compile 'com.android.support:multidex:1.0.1'
compile 'pl.droidsonroids.gif:android-gif-drawable:1.2.8'
compile 'com.android.support:design:26.+'
compile 'com.android.support:support-v4:26.+'
compile 'com.github.bumptech.glide:glide:4.2.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.github.jd-alexander:library:1.1.0'
compile 'com.google.maps.android:android-maps-utils:0.5'
compile 'com.facebook.android:facebook-android-sdk:[4,5)'
testCompile 'junit:junit:4.12'
annotationProcessor 'com.github.bumptech.glide:compiler:4.2.0'
}
apply plugin: 'com.google.gms.google-services'
対象となるsdkのバージョンを26 – Raj
に変更してください。「既に回答済みのスレッドから解決できる解決策が見つかりません」 - 質問を編集して詳細を説明してください。 – CommonsWare
'gradlew dependencies'を実行し、古いバージョンのサポートライブラリを見つけて、build.gradleにバージョン26で追加してください。 – DeKaNszn