I'm trying to upgrade android.arch.persistence.room in my android project.
Now I'm using the alpha-9 and all is working correctly.
If I try to use the "released" version 1.0.0 I'll recive the error reported below on the line compile 'com.android.support:appcompat-v7:26.0.2'.
Error:Execution failed for task ':app:processDebugManifest'.
Manifest merger failed : Attribute meta-data#android.support.VERSION#value value=(26.0.2) from [com.android.support:design:26.0.2] AndroidManifest.xml:28:13-35
is also present at [com.android.support:support-core-utils:26.1.0] AndroidManifest.xml:28:13-35 value=(26.1.0).
Suggestion: add 'tools:replace="android:value"' to element at AndroidManifest.xml:26:9-28:38 to override.
The gradle file is
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion '26.0.2'
defaultConfig {
minSdkVersion 18
targetSdkVersion 26
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
useLibrary 'org.apache.http.legacy'
}
}
}
dependencies {
debugCompile 'com.amitshekhar.android:debug-db:1.0.1'
compile 'com.android.support:appcompat-v7:26.0.2'
compile 'com.android.support:design:26.0.2'
compile 'com.google.code.gson:gson:2.2.4'
compile 'com.android.support:support-v4:26.0.2'
compile 'com.journeyapps:zxing-android-embedded:3.5.0'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
compile 'android.arch.persistence.room:runtime:1.0.0'
annotationProcessor 'android.arch.persistence.room:compiler:1.0.0'
}
Does someone kwnow how I can fix it?
Thanks
Change:
compile 'com.android.support:appcompat-v7:26.0.2'
compile 'com.android.support:design:26.0.2'
compile 'com.android.support:support-v4:26.0.2'
to:
compile 'com.android.support:appcompat-v7:26.1.0'
compile 'com.android.support:design:26.1.0'
compile 'com.android.support:support-v4:26.1.0'
See if the changes to following versions would work for you:
(archLifecycleVersion = '1.0.0'
roomLifecycleVersion = '1.0.0')
annotationProcessor "android.arch.lifecycle:compiler:$rootProject.ext.archLifecycleVersion"
compile "android.arch.lifecycle:runtime:$rootProject.ext.archLifecycleVersion"
compile "android.arch.lifecycle:extensions:$rootProject.ext.archLifecycleVersion"
compile "android.arch.persistence.room:runtime:$rootProject.roomLifecycleVersion"
annotationProcessor "android.arch.persistence.room:compiler:$rootProject.roomLifecycleVersion"
Related
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 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
I'm getting a compile error after adding CardView and RecyclerView dependencies, I've checked every post but no one seems to solve this case.
Error:
Error:Execution failed for task ':app:processDebugManifest'. Manifest merger failed : Attribute meta-data#android.support.VERSION#value value=(25.3.1) from [com.android.support:appcompat-v7:25.3.1] AndroidManifest.xml:27:9-31
is also present at [com.android.support:cardview-v7:26.0.0-alpha1] AndroidManifest.xml:24:9-38 value=(26.0.0-alpha1).
Suggestion: add 'tools:replace="android:value"' to element at AndroidManifest.xml:25:5-27:34 to override.
My Build.Gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "26.0.0"
defaultConfig {
applicationId "com.soft.kukito.cardviewprueba"
minSdkVersion 21
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'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
compile 'com.android.support:cardview-v7:26.0.0-alpha1'
compile 'com.android.support:recyclerview-v7:26.0.0-alpha1'
}
Thank everyone for answering.
You need to use the same android support library version. You need to use support library 26.0.0-alpha1 version. So change the following:
compile 'com.android.support:appcompat-v7:25.3.1'
to
compile 'com.android.support:appcompat-v7:26.0.0-alpha1'
You also need to change the compileSdkVersion and targetSdkVersion to version 26.
compile 'com.google.firebase:firebase-database:10.2.0'
After I added this dependency, the problem occurs. Before that, the GoogleApiClient works fine. I remove that dependency, the problem is solved. Do GoogleApiClient and Firebase have conflict about each other? Please help.
EDIT: Gradle file:
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 23
buildToolsVersion '25.0.0'
defaultConfig {
applicationId "application.id"
minSdkVersion 16
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
testCompile 'junit:junit:4.12'
compile 'com.android.support:appcompat-v7:23.2.1'
compile 'com.android.support:design:23.2.1'
compile 'com.google.android.gms:play-services:8.4.0'
compile 'com.google.android.gms:play-services-identity:8.4.0'
compile 'com.google.android.gms:play-services-ads:8.4.0'
compile 'com.google.android.gms:play-services-gcm:8.4.0'
compile 'com.google.android.gms:play-services-auth:8.4.0'
compile 'com.google.android.gms:play-services-location:8.4.0'
compile 'com.google.firebase:firebase-database:10.2.0'
}
GoogleApiClient and firebase-database will work, if you add below dependencies,
compile 'com.google.android.gms:play-services-auth:10.2.0'
compile 'com.google.firebase:firebase-database:10.2.0'
firebase-database dependency will not affect GoogleApiClient
Please keep same versions for firebase & Google Play Services API(10.2.0)
Please re-check you have set up everything as below guidance,
https://firebase.google.com/docs/android/setup
I keep getting the BUILD FAILED in Android studio and I have resolved other similar error before but this one is hard. Basically what i do is adding the quickstart-android-auth to an existing working Android project.
Everything worked until i adding the quickstart-android-auth files and independents.
Error:Execution failed for task ':app:processDebugManifest'.
Manifest merger failed : uses-sdk:minSdkVersion 14 cannot be smaller than version 15 declared in library
[com.facebook.android:facebook-android-sdk:4.16.0]
D:\AndroidStudioProjects\Nogget\app\build\intermediates\exploded-aar\com.facebook.android\facebook-android-sdk\4.16.0\AndroidManifest.xml
Suggestion: use tools:overrideLibrary="com.facebook" to force usage
And here is my Build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 24
buildToolsVersion '24.0.2'
dexOptions {
dexInProcess = true
}
defaultConfig {
applicationId "com.port.android"
minSdkVersion 14
targetSdkVersion 24
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
repositories {
maven { url 'https://oss.sonatype.org/content/repositories/snapshots' }
mavenCentral()
}
packagingOptions{
exclude 'META-INF/LICENSE'
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.volley:volley:1.0.0'
compile 'com.android.support:support-compat:24.2.0'
compile 'com.google.android.gms:play-services:9.6.0'
compile 'com.android.support:support-v13:24.2.0'
compile "com.google.firebase:firebase-messaging:9.0.0"
compile 'org.jbundle.util.osgi.wrapped:org.jbundle.util.osgi.wrapped.org.apache.http.client:4.1.2'
compile 'com.google.code.gson:gson:2.4'
compile 'com.android.support:design:24.2.0'
compile 'de.hdodenhof:circleimageview:1.3.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.android.support:percent:24.2.0'
compile 'me.grantland:autofittextview:0.2.+'
compile 'com.google.firebase:firebase-auth:9.2.1'
compile 'com.google.firebase:firebase-messaging:9.2.1'
compile 'com.google.android.gms:play-services-appinvite:9.6.0'
compile 'com.google.firebase:firebase-analytics:9.2.1'
compile 'com.google.firebase:firebase-crash:9.6.0'
compile 'com.google.android.gms:play-services-ads:9.6.0'
compile 'com.github.bmelnychuk:atv:1.2.+'
compile 'com.github.johnkil.print:print:1.2.2'
testCompile 'junit:junit:4.12'
compile 'com.seatgeek:placesautocomplete:0.2-SNAPSHOT'
compile 'com.fasterxml.jackson.core:jackson-core:2.7.2'
compile 'com.fasterxml.jackson.core:jackson-annotations:2.7.2'
compile 'com.fasterxml.jackson.core:jackson-databind:2.7.2'
compile 'com.facebook.android:facebook-android-sdk:4.16.0'
compile('com.twitter.sdk.android:twitter-core:1.6.6#aar') {
transitive = true
}
compile('com.twitter.sdk.android:twitter:1.13.1#aar') {
transitive = true;
}
}
apply plugin: 'com.google.gms.google-services'
As the error says, your minSDK is 14 but the latest FacebookSDK requires mins SDK 15. Increasing your minSDK should resolve your issue
Change your minSdkVersion to 15 instead of 14.
The Facebook library require api 15. So your project can't have a minsdkversion to 14...
Set the minSdk in your build.gradle to 15 as facebook supports from API 15.