web-dev-qa-db-ger.com

Manifest Merger Fehler bei Verwendung der neuesten Version von Firebase

Ich habe versucht, die neueste Version von Firebase für Android in meiner Gradle-Datei zu verwenden. Ich versuche, eine Firebase-Rufnummernauthentifizierung zu erstellen, aber ich bekomme ständig diese Fehlermeldung, weil ich nicht speziell zu meinem Problem gefunden habe: enter image description here

Error:Execution failed for task ':app:processDebugManifest'.
> Manifest merger failed : Attribute meta-data#[email protected] value=(26.0.2) from [com.Android.support:design:26.0.2] AndroidManifest.xml:28:13-35
is also present at [com.Android.support:customtabs:26.0.1] AndroidManifest.xml:25: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.

Hier ist meine App: Gradle-Datei

apply plugin: 'com.Android.application'

Android {
compileSdkVersion 26
buildToolsVersion "26.0.1"
defaultConfig {
    applicationId "com.shimetaapp.shimetacustomerapp"
    minSdkVersion 21
    targetSdkVersion 26
    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(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.squareup.picasso:picasso:2.5.2'
compile 'com.squareup.retrofit2:retrofit:2.3.0'
compile 'com.squareup.retrofit2:converter-gson:2.3.0'
compile 'com.synnapps:carouselview:0.1.4'
compile 'com.astuetz:pagerslidingtabstrip:1.0.1'
compile 'com.Android.support:appcompat-v7:26.+'
compile 'com.Android.support:design:26.+'
compile 'de.hdodenhof:circleimageview:2.1.0'
compile 'com.Android.support.constraint:constraint-layout:1.0.0-alpha7'
compile 'com.Android.support:cardview-v7:26.+'
compile 'com.Android.support:recyclerview-v7:26.+'
compile 'com.Android.support:support-v4:26.+'
compile 'com.Android.support:support-vector-drawable:26.+'
//    compile 'com.facebook.Android:account-kit-sdk:4.11.0'
//    compile 'com.facebook.Android:facebook-Android-sdk:4.11.0'// Firebase Authentication
testCompile 'junit:junit:4.12'
// Firebase Database
compile 'com.google.firebase:firebase-auth:11.0.4'
compile 'com.google.firebase:firebase-messaging:11.0.4'
compile 'com.google.firebase:firebase-config:11.0.4'
compile 'com.firebaseui:firebase-ui-auth:2.3.0'
}
apply plugin: 'com.google.gms.google-services'

Hier ist meine Manifestdatei

<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:Android="http://schemas.Android.com/apk/res/Android"
package="com.shimetaapp.shimetacustomerapp">

<uses-permission Android:name="Android.permission.INTERNET" />
<uses-permission Android:name="Android.permission.READ_PHONE_STATE" />
<uses-permission Android:name="Android.permission.RECEIVE_SMS" />
<uses-permission Android:name="Android.permission.GET_ACCOUNTS" />
<uses-permission Android:name="Android.permission.READ_CONTACTS" />
<uses-permission Android:name="Android.permission.WRITE_CONTACTS" />
<uses-permission Android:name="Android.permission.MANAGE_ACCOUNTS" />
<uses-permission Android:name="Android.permission.READ_PROFILE" />

<application
    Android:name=".activity.App"
    Android:allowBackup="true"
    Android:icon="@mipmap/ic_launcher"
    Android:label="@string/app_name"
    Android:roundIcon="@mipmap/ic_launcher_round"
    Android:supportsRtl="true"
    Android:theme="@style/AppTheme">

    <activity
        Android:name=".activity.MainActivity"
        Android:theme="@style/AppTheme" />
    <activity
        Android:name=".activity.ProfileActivity"
        Android:theme="@style/AppTheme.NoActionBar" />
    <activity
        Android:name=".activity.SettingsActivity"
        Android:label="@string/title_activity_settings" />
    <activity
        Android:name=".activity.SplashActivity"
        Android:theme="@style/AppTheme.NoActionBar">
        <intent-filter>
            <action Android:name="Android.intent.action.MAIN" />

            <category Android:name="Android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity Android:name=".activity.Purchases" />
    <activity Android:name=".activity.PhoneNumberAuthentication">
        <intent-filter>
            <action Android:name="Android.intent.action.MAIN"/>
            <category Android:name="Android.intent.category.DEFAULT"/>
        </intent-filter>
    </activity>
</application>

Dies ist die Dokumentation, mit der ich meine Firebase in meinem Android-Studio eingerichtet habe.

7
Kidus Tekeste

Versionskonflikt zwischen Supportartefakt

com.Android.support:design:26.0.2 und com.Android.support:customtabs:26.0.1

Aktualisieren Sie Ihre firebase-auth-Version. Firebase-auth hat in Ihrem Fall eine Abhängigkeit von customtabs, die eine niedrigere Version von 26.0.1 ist.

compile 'com.google.firebase:firebase-auth:11.2.0'
compile 'com.google.firebase:firebase-messaging:11.2.0'
compile 'com.google.firebase:firebase-config:11.2.0'
4
Aryan

fügen Sie diesen Code der Gradle-Datei hinzu

configurations.all {
    resolutionStrategy.eachDependency { DependencyResolveDetails details ->
        def requested = details.requested
        if (requested.group == 'com.Android.support') {
            if (!requested.name.startsWith("multidex")) {
                details.useVersion '26.0.0'
            }
        }
    }
}
0
Najib