Manifest merger failed when adding Firebase-ui-auth in android - android

I am unable to configure Firebase-ui-auth in my app. I have tried all versions of firebase-ui-auth but have so far failed.
I read many questions related to firebase-ui-auth but none have helped. I do not want to change my current SDK version.
I have added the below line in gradle.build(Project:Project_Name) :
maven { url 'https://maven.fabric.io/public' }
and this is my gradle.build(Module:app) :
apply plugin: 'com.android.application'
android {
compileSdkVersion 23
buildToolsVersion '26.0.0'
defaultConfig {
applicationId "com.example.nishant.kitbook"
minSdkVersion 21
targetSdkVersion 23
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:23.4.0'
compile 'com.android.support:support-v4:23.4.0'
compile 'com.android.support:design:23.4.0'
compile 'com.google.firebase:firebase-database:10.0.1'
compile 'com.firebaseui:firebase-ui-auth:1.1.1'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
Here is the error I am getting:
Error:Execution failed for task ':app:processDebugManifest'.
Manifest merger failed : Attribute application#supportsRtl value=(true) from AndroidManifest.xml:12:9-35 is also present at [com.firebaseui:firebase-ui-auth:1.1.1] AndroidManifest.xml:14:18-45 value=(false). Suggestion: add 'tools:replace="android:supportsRtl"' to <application> element at AndroidManifest.xml:8:5-33:19 to override.

I had to drop by a version from 2.1.0 to 2.0.1 for the Gradle file to compile properly.

Ok this eat my half a day. i just changed firebase-ui-auth version to 1.0.1 from 1.1.1 and it worked. if anyone got any problem relating firebase-ui just check firebase-ui version one by one in descending order, one should work for you.

Related

Cannot access ActivityCompatApi23 class

I am having runtime problems with my gradle file. I added this compile 'com.google.android:flexbox:0.3.1' as a compile time dependency to my Gradle file. I encountered an error and added this in my project level Gradle file.
maven {
url "https://maven.google.com"
}
Which finally looked liked this after adding the above
allprojects {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
}
}
After adding the above in my app level Gradle file I am now encountering a different error when I am trying to run my app. So I did the following as per some answers from SO.
Tried a Clean and Rebuild.
Navigated to the path projectName\.idea\libraries and deleted the files that contained the support library version other than the current versions 25.3.1
3.In order to solve the error I further removed this line from my app level Gradle file,
androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support', module: 'support-annotations'
})
Now the final Gradle file looks like this with the error,
Error:
Error:(28, 8) error: cannot access ActivityCompatApi23
class file for android.support.v4.app.ActivityCompatApi23 not found
My Gradle file
apply plugin: 'com.android.application'
android {
compileSdkVersion 25
buildToolsVersion "25.0.3"
defaultConfig {
applicationId "com.example.test"
minSdkVersion 19
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'
}
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'com.android.support:design:25.3.1'
compile 'com.android.support:cardview-v7:25.3.1'
compile 'com.android.support:support-v4:25.3.1'
compile 'com.google.android:flexbox:0.3.1'
compile 'uk.co.chrisjenx:calligraphy:2.3.0'
testCompile 'junit:junit:4.12'
}
Like the Problem I meet。
When I Use Android Room like this :
compileSdkVersion 25
compile "android.arch.persistence.room:runtime:1.0.0"
I get the same Error.
Because compileSdkVersion should match support libs major version.
More Detail you can see this :
Error in support lib after room persistence
Room depends on 26.1 of support library, which is probably why it is broken because SupportLibrary does not promise interop between versions.
Also, you can fix the problem use this
compile ("android.arch.persistence.room:runtime:1.0.0") {
exclude group: 'com.android.support'
}
You have declared compileSdkVersion equal to 25, whereas 0.3.1 version of flexbox layout uses support libs version 26.0.0 - that's a problem, compileSdkVersion should match support libs major version.
Either upgrade your project to 26 or use a version of flexbox layout that relies on sdk 25, which seems to be v0.2.7:
compile 'com.google.android:flexbox:0.2.7'
use
compile 'com.android.support:appcompat-v7:26.1.0'
I just changed the line
compile 'com.android.support:appcompat-v7:26.0.0-alpha1'
to
compile 'com.android.support:appcompat-v7:26.+'
and it worked for me

Error on com.android.support:appcompat-v7, when try add facebook SDK

I wanna install login facebook sdk in my Android app, already i import the SDK to the project app, the problem i get is with appcompat
the problem is i dont know what need to do to fix the problem, i dont know how to implement the suggestion android studio give
below show the details of my code
this is my :
build.gradle (Module:app)
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "26.0.1"
defaultConfig {
applicationId "com.perugiftart.facebooksdk"
minSdkVersion 15
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(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:26.+'
compile 'com.android.support.constraint:constraint-layout:1.0.2'
testCompile 'junit:junit:4.12'
compile project(':facebook-android-sdk-4.25.0')
compile 'com.android.support:cardview-v7:26.0.0-alpha1'
compile 'com.facebook.android:facebook-android-sdk:[4,5)'
}
the error appear here:
compile 'com.android.support:appcompat-v7:26.+'
this is the message 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:appcompat-v7:26.0.0-alpha1]
AndroidManifest.xml:27:9-38 is also present at
[com.android.support:customtabs:25.3.1] AndroidManifest.xml:24:9-31
value=(25.3.1). Suggestion: add 'tools:replace="android:value"' to
element at AndroidManifest.xml:25:5-27:41 to override.
im not sure how can fix this error on my code, please help

Execution failed for task :app:processDebugManifest Android Studio 2.3.3

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 appcompat v7:26.+ error when adding play services for fusion location provider

I have an issue and have looked at possible duplicate questions and answers and I think this one is not answered by the others so asking it here.
I updated my play services to make use of the fused location provider and now the appcompat in my gradle is showing an error.
So I created a new project and checked the build.gradle on the new project and have exactly the same appcompat but my project is showing an error.
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "26.0.0"
defaultConfig {
applicationId "au.com.itmobilesupport.sqltwo"
minSdkVersion 17
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(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:26.+'
compile 'com.android.support:recyclerview-v7:26.+'
compile 'com.readystatesoftware.sqliteasset:sqliteassethelper:+'
testCompile 'junit:junit:4.12'
compile 'com.google.android.gms:play-services-maps:11.0.0'
compile 'com.google.android.gms:play-services:11.0.1'
}
Its this line that is showing the error:
compile 'com.android.support:appcompat-v7:26.+'
But in a new project its fine. Why am I getting the error?
UPDATE:
If I remove these two lines then the error goes away:
compile 'com.google.android.gms:play-services-maps:11.0.0'
compile 'com.google.android.gms:play-services:11.0.1'
But I need them so still have the error.
Add these lines to your build.gradle file to get libraries that you don't have based on Google site.
allprojects {
repositories {
jcenter()
maven {
url "https://maven.google.com"
}
}
}
Caution: Using dynamic dependencies (for example, palette-v7:23.0.+) can cause unexpected version updates and regression incompatibilities. We recommend that you explicitly specify a library version (for example, palette-v7:25.4.0).
Finally solved the issue with the help of ZeroOne's answer to a similar question.
What led me to look at ZeroOnes answer was Google giving me the reason but not as an error. My issue was that the following line is too encompassing and a lot of extra dependencies were added that would have made the app unnecessarily larger.
compile 'com.google.android.gms:play-services:11.0.1'
I simply needed to be more specific and the error disappeared.
Here is the final gradle.
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
buildToolsVersion "26.0.0"
defaultConfig {
applicationId "au.com.itmobilesupport.sqltwo"
minSdkVersion 17
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(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:26.+'
compile 'com.android.support:recyclerview-v7:26.+'
compile 'com.readystatesoftware.sqliteasset:sqliteassethelper:+'
testCompile 'junit:junit:4.12'
compile 'com.google.android.gms:play-services-maps:11.0.1'
compile 'com.google.android.gms:play-services-location:11.0.1'
}
And this is the specifc line I change the above to:
compile 'com.google.android.gms:play-services-location:11.0.1'
Hope it helps someone who comes across the same issue.
Being more specific using compile 'com.google.android.gms:play-services-location:11.0.1' rather than compile 'com.google.android.gms:play-services:11.0.1' saved my project as well, tks a lot guys.

Error while generating build apk file in my android studio

I am trying to build apk file in my android studio but it is generating the following error.
Error:Execution failed for task ':app:transformClassesWithJarMergingForDebug'.
com.android.build.api.transform.TransformException: java.util.zip.ZipException: duplicate entry: com/google/android/gms/common/api/zzd.class
How to get out from this issue and build apk file.
Mygradle file code is:
apply plugin: 'com.android.application'
android {
compileSdkVersion 24
buildToolsVersion "25.0.2"
defaultConfig {
applicationId "com.wedding.weddingapp"
minSdkVersion 16
targetSdkVersion 24
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
configurations { all*.exclude module: 'gson-2.5' }
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
repositories {
maven { url "https://raw.githubusercontent.com/layerhq/releases-android/master/releases/" }
maven { url "https://raw.githubusercontent.com/layerhq/Atlas-Android/master/releases/" }
}
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.layer.atlas:layer-atlas:0.3.6'
compile 'com.google.firebase:firebase-messaging:9.8.0'
compile 'com.android.support:appcompat-v7:24.2.1'
compile 'com.android.support:design:24.2.1'
compile 'com.android.volley:volley:1.0.0'
compile 'de.hdodenhof:circleimageview:2.1.0'
compile 'com.android.support:support-v4:24.2.1'
testCompile 'junit:junit:4.12'
}
// ADD THIS AT THE BOTTOM
apply plugin: 'com.google.gms.google-services'
Its probably because you must be using older version of google services
please make sure apply plugin: 'com.google.gms.google-services'
and com.google.firebase:firebase-messaging:9.8.0 are compatible note don't use com.google.gms.google-services 9.0.0 please make sure you are using above 9.0.0 version

Categories

Resources