I have upgraded to android studio canary and trying to add firebase UI to my app but am getting the following error:
Manifest merger failed : Attribute meta-data#android.support.VERSION#value value=(26.0.1) from [com.android.support:customtabs:26.0.1] AndroidManifest.xml:25:13-35
is also present at [com.android.support:design:26.1.0] AndroidManifest.xml:28:13-35 value=(26.1.0).
Suggestion: add 'tools:replace="android:value"' to <meta-data> element at AndroidManifest.xml:23:9-25:38 to override.
It seems to be some dependency problem but cant figure it out yet. My gradle file is as follow
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "26.0.1"
defaultConfig {
applicationId "com.rainbow.dili"
minSdkVersion 16
targetSdkVersion 25
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = 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'
}
}
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.firebase:firebase-database:12.0.1'
compile 'com.google.firebase:firebase-storage:12.0.1'
compile 'com.firebaseui:firebase-ui:2.3.0'
compile 'com.tbuonomo.andrui:viewpagerdotsindicator:1.0.1'
compile 'com.android.support:appcompat-v7:26.1.0'
compile 'com.android.support:design:26.1.0'
compile 'com.android.support.constraint:constraint-layout:1.1.0-beta6'
compile 'com.droidninja:filepicker:2.0.7'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.android.support:cardview-v7:26.1.0'
compile 'com.google.code.gson:gson:2.8.0'
compile 'com.squareup.retrofit2:retrofit:2.1.0'
compile 'com.squareup.retrofit2:converter-gson:2.1.0'
compile 'com.android.support:support-v4:26.1.0'
compile 'me.relex:circleindicator:1.2.2#aar'
compile 'jp.wasabeef:picasso-transformations:2.1.0'
compile 'com.android.support:support-vector-drawable:26.1.0'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
I have been advised to get the same version for
compileSdkVersion 26
and
buildToolsVersion "26.0.1"
but still get the same error. What might be causing this ?
You are using an old version of firebaseui that is not compatible with version 12.0.1 of firebase, to solve this:
Change the following:
compile 'com.firebaseui:firebase-ui:2.3.0'
to this:
compile 'com.firebaseui:firebase-ui:3.3.0'
more info here:
https://github.com/firebase/FirebaseUI-Android#compatibility-with-firebase--google-play-services-libraries
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.
When i am adding the library for CardView ("compile 'com.android.support:cardview-v7:25.3.1'") in my build.gradle ( Module : app ) file it is showing me error
Please help me in this !!
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "27.0.3"
defaultConfig {
applicationId "in.trysafe.trysafecfs"
minSdkVersion 14
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:design:26.+'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:cardview-v7:25.3.1'
compile 'com.google.firebase:firebase-core:10.0.1'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.squareup.retrofit2:retrofit:2.3.0'
compile 'com.squareup.retrofit2:converter-gson:2.3.0'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
it is showing me this error:
Error:Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : Attribute meta-data#android.support.VERSION#value
value=(26.0.0-alpha1) from [com.android.support:design:26.0.0-alpha1]
AndroidManifest.xml:27:9-38
is also present at [com.android.support:cardview-v7:25.3.1]
AndroidManifest.xml:24:9-31 value=(25.3.1).
Suggestion: add 'tools:replace="android:value"' to <meta-data> element at
AndroidManifest.xml:25:5-27:41 to override.
Change your
compile 'com.android.support:cardview-v7:25.3.1'
to
compile 'com.android.support:cardview-v7:26.+'
Because ALL support libs shoud be the same version.
Use exact same version of dependency instead of 26.+
compile is deprecated
Also Use implementation instead of compile
Try this
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support:design:26.1.0'
implementation 'com.android.support:cardview-v7:26.1.0'
Than clean - Re-Build - Run your project
I wanted to go back and continue my android app after 4 month, what happend is that manifest doesn't sync with the following error:
Error:Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : Attribute meta-data#android.support.VERSION#value value=(26.1.0) from [com.android.support:support-v13:26.1.0] AndroidManifest.xml:28:13-35
is also present at [com.android.support:design:26.0.1] AndroidManifest.xml:28:13-35 value=(26.0.1).
Suggestion: add 'tools:replace="android:value"' to <meta-data> element at AndroidManifest.xml:26:9-28:38 to override.
and my manifest is:
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion '26.0.2'
defaultConfig {
applicationId "com.arnick.bazim"
minSdkVersion 21
targetSdkVersion 26
versionCode 7
versionName "0.9.5"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
manifestPlaceholders = [onesignal_app_id : #the one signal app id,
onesignal_google_project_number: "REMOTE"]
}
applicationVariants.all { variant ->
variant.resValue "string", "versionName", variant.versionName
}
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:support-v13:26.1.0'
compile 'com.android.support:appcompat-v7:26.1.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:cardview-v7:26.0.1'
compile 'com.android.support:design:26.0.1'
compile 'com.android.support:support-v4:26.1.0'
compile 'com.android.support:customtabs:26.1.0'
compile 'com.google.firebase:firebase-auth:11.6.2'
compile 'com.google.android.gms:play-services-auth:11.6.2'
compile('io.socket:socket.io-client:1.0.0') {
// excluding org.json which is provided by Android
exclude group: 'org.json', module: 'json'
}
compile 'com.onesignal:OneSignal:3.6.5'
compile 'com.android.volley:volley:1.0.0'
testCompile 'junit:junit:4.12'
}
if that matters, I'm using local gralde version 4.2.1
I have also checked gradle 4.3.1 and non-local gradle but the error is still there.
Is there anything I am missing?
I remember about 5 6 months ago I faced the same issue I guess, and that was related to onesignal version but I do not remember what happened I just know I changed the version and error disappeared.
use same version as at top of gradle file 26.0.2
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion '26.0.2'
defaultConfig {
applicationId "com.arnick.bazim"
minSdkVersion 21
targetSdkVersion 26
versionCode 7
versionName "0.9.5"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
manifestPlaceholders = [onesignal_app_id : #the one signal app id,
onesignal_google_project_number: "REMOTE"]
}
applicationVariants.all { variant ->
variant.resValue "string", "versionName", variant.versionName
}
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:support-v13:26.0.2'
compile 'com.android.support:appcompat-v7:26.0.2'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.android.support:cardview-v7:26.0.2'
compile 'com.android.support:design:26.0.2'
compile 'com.android.support:support-v4:26.0.2'
compile 'com.android.support:customtabs:26.0.2'
compile 'com.google.firebase:firebase-auth:11.6.2'
compile 'com.google.android.gms:play-services-auth:11.6.2'
compile('io.socket:socket.io-client:1.0.0') {
// excluding org.json which is provided by Android
exclude group: 'org.json', module: 'json'
}
compile 'com.onesignal:OneSignal:3.6.5'
compile 'com.android.volley:volley:1.0.0'
testCompile 'junit:junit:4.12'
}
clean and rebuild this may help...
Use the same version of support libraries:
Change
compile 'com.android.support:cardview-v7:26.0.1'
compile 'com.android.support:design:26.0.1'
with
compile 'com.android.support:cardview-v7:26.1.0'
compile 'com.android.support:design:26.1.0'
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'
I updated Android Studio and SDK tools to the latest version and now I got this error. I have updated Google Services and firebase dependencies accordingly. I tried to clean and rebuild the project but the result is same.
Error:Execution failed for task ':app:compileDebugJavaWithJavac'.
> java.lang.NullPointerException: element == null
Here is my gradle build:
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "26.0.0"
defaultConfig {
applicationId "com.crisser.beitnaonline"
minSdkVersion 16
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
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'
})
//noinspection GradleCompatible
compile('com.android.support:cardview-v7:23.2.0') {
force = true
}
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'com.google.firebase:firebase-database:11.0.0'
compile 'com.google.firebase:firebase-auth:11.0.0'
compile 'com.google.firebase:firebase-core:11.0.0'
compile 'com.facebook.android:facebook-android-sdk:[4,5)'
compile 'com.google.android.gms:play-services-maps:11.0.0'
compile 'com.android.support:support-v4:25.3.1'
compile 'com.android.support:multidex:1.0.1'
compile 'de.hdodenhof:circleimageview:2.1.0'
compile
'net.yslibrary.keyboardvisibilityevent:keyboardvisibilityevent:2.1.0'
compile 'com.android.support:recyclerview-v7:25.3.1'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.appolica:interactive-info-window:v1.0.6'
testCompile 'junit:junit:4.12'
annotationProcessor 'com.github.bumptech.glide:compiler:4.0.0-RC0'
}
apply plugin: 'com.google.gms.google-services'
Anyone knows why it does that? It worked just fine with 25.0.3.
You didn't compile corresponding dependency with annotation
annotationProcessor 'com.github.bumptech.glide:compiler:4.0.0-RC0'
Add this to your gradle file
compile 'com.github.bumptech.glide:glide:4.0.0'
I have gone through same issue. I just removed the dependency I added and my app began to work fine.
you should remove library one by one and build the application..