I just updated my Android Studio to 2.3.1 and I'm getting this error in my gradle
compile 'com.android.support:appcompat-v7:25.2.0'
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.1.1. Examples include com.android.support:animated-vector-drawable:25.3.1 and com.android.support:support-v13:25.1.1
So I did update the line to :
compile 'com.android.support:appcompat-v7:25.3.1'
And still not working! The SDK install are : 24.2 and 25.3
Gradle :
apply plugin: 'com.android.application'
apply plugin: 'realm-android'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId
minSdkVersion 15
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 group: 'com.google.code.gson', name: 'gson', version: '2.8.0'
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:design:25.3.1'
compile 'com.squareup.okhttp3:okhttp:3.4.2'
compile 'com.android.support:cardview-v7:25.3.1'
compile 'com.android.support:recyclerview-v7:25.3.1'
compile 'com.wdullaer:materialdatetimepicker:3.1.2'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
Related
I just included ads into my app and as part of that process I included
/*google play plugin for adMob*/
compile 'com.google.android.gms:play-services:10.2.1'
as a dependency in my gradle app file. But I'm getting a red underscore error under
compile 'com.android.support:appcompat-v7:26.+'
error says:
all com.android.libraries support must use same version specification. mixing can lead to crashes.
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "26.0.2"
defaultConfig {
applicationId "org.pctechtips.george.dailyquotes"
minSdkVersion 16
targetSdkVersion 26
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'
/*firebase */
// compile 'com.google.firebase:firebase-core:10.2.1'
})
// compile 'com.android.support:appcompat-v7:21.0.3'
compile 'com.android.support:appcompat-v7:26.+'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:support-v4:26.+'
testCompile 'junit:junit:4.12'
/*google play plugin for adMob*/
compile 'com.google.android.gms:play-services:10.2.1'
}
play-services-ads:10.2.1 has a dependency onto play-services-basement:10.2.1 which has a dependency onto com.android.support:support-v4:24.0.0. This is likely the source of the mismatch.
See All com.android.support libraries must use the exact same version specification for more context.
This was working before I added firebaseui dependency. Now I'm getting this: log
Its red lining compile 'com.android.support:appcompat-v7:26.+' and when I hover over it, it says "all libraries must be exact same specification version". That version was what was there when the project was created.
app/build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "26.0.1"
defaultConfig {
applicationId "com.android.adarak"
minSdkVersion 21
targetSdkVersion 26
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:26.+'
compile 'com.android.support:support-v4:26.+'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.google.firebase:firebase-auth:10.0.1'
//compile 'com.firebaseui:firebase-ui-auth:2.3.0'
compile 'com.firebaseui:firebase-ui:2.3.0'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
The firebaseui internally has a dependency on a specific version of Android support library. The firebase ui configuration contains 26.0.1 as the required support library version.
However your gradle file has a dependency on 26.+ which tells gradle to use the latest in the 26.x.x series and this could be different from 26.0.1. You can solve the issue by using the specific version required by firebase-ui (26.0.1)
Change the gradle file as shown below,
compile 'com.android.support:appcompat-v7:26.0.1'
compile 'com.android.support:support-v4:26.0.1'
this code of my build.gradle(moudule app)
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.3"
defaultConfig {
applicationId "com.example.hn.myapplication"
minSdkVersion 14
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.constraint:constraint-layout:1.0.2'
compile 'com.android.support:appcompat-v7:25.+'
compile 'com.android.support:recyclerview-v7:25.+'
compile 'com.android.support:support-v4:25.+'
compile 'com.android.support:design:25.+'
//compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha7'
compile 'com.android.support.constraint:constraint-layout:1.0.0'
testCompile 'junit:junit:4.12'
}
and this is my sdk tools.
I try compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha7'
and compile 'com.android.support.constraint:constraint-layout:1.0.0'
and compile 'com.android.support.constraint:constraint-layout:1.+'
but not working. and error is
Failed to resolve: com.android.support.constraint:constraint-layout:1
who I solve this problem?
When I use compile 'com.android.support.constraint:constraint-layout:1.0.0-alpha7
this error done: install artifact and sync project
go to file -> setting -> sdk manager -> sdk tools -> then install google repository
Hi should i be worried about this gradle warning/error?
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "com.example.bananasandpajamas.pilloclock"
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(include: ['*.jar'], dir: 'libs')
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' <---- THIS ONE
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
//compile 'com.google.firebase:firebase-core:10.2.1'
//compile 'com.google.firebase:firebase-auth:10.2.1'
//compile 'com.google.android.gms:play-services-auth:10.2.1'
compile 'com.firebaseui:firebase-ui-auth:1.2.0'
}
apply plugin: 'com.google.gms.google-services'
It's giving me a warning that there are two versions of android.support:appcompat.
But when i tried to downgrade it to 25.1.1. It gives me warning that i should use the latest one.
edit:
Error message : 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.1.1. Examples include
com.android.support:animated-vector-drawable:25.3.1 and
com.android.support:cardview-v7:25.1.1
Your build version is buildToolsVersion "25.0.2"
and your dependencie version is
compile 'com.android.support:appcompat-v7:25.3.1'
How it will compile ?
Change your version in appcompat version or update your android studio..
I am trying to add the firebase admin SDK to my project following the instructions here: https://firebase.google.com/docs/admin/setup
but when i add compile 'com.google.firebase:firebase-admin:4.0.4' on my build.grandle file, then following error appears:
Error:(44, 0) Version: 4.0.4 is lower than the minimum version (9.0.0) required for google-services plugin.
If i try version 4.0.3 i face the same problem.
My build.grandle file at the moment:
android {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
compileSdkVersion 25
buildToolsVersion "25.0.1"
defaultConfig {
applicationId "com.example.qrcodereader"
minSdkVersion 19
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.google.android.gms:play-services-appindexing:9.0.0'
compile 'com.android.support:appcompat-v7:25.1.0'
compile 'com.google.zxing:core:3.2.1'
compile 'com.google.firebase:firebase-admin:4.0.4'
compile 'com.journeyapps:zxing-android-embedded:3.2.0#aar'
compile 'com.android.support:gridlayout-v7:25.1.0'
compile 'com.google.firebase:firebase-core:10.0.1'
compile 'com.google.firebase:firebase-database:10.0.1'
compile 'com.firebaseui:firebase-ui:1.1.0'
compile 'com.android.support:support-v4:25.1.0'
compile project(':linkedin-sdk')
testCompile 'junit:junit:4.12'
compile 'com.facebook.android:facebook-android-sdk:[4,5)'
}
apply plugin: 'com.google.gms.google-services'
Any help appreciated :)