2017-08-28 70 views
0
Error:Execution failed for task ':app:processDebugManifest'. 
> Manifest merger failed : Attribute meta-data#[email protected] value=(@string/facebook_app_id) from AndroidManifest.xml:19:13-52 
    is also present at [com.firebaseui:firebase-ui-auth:1.2.0] AndroidManifest.xml:23:13-60 value=(@string/facebook_application_id). 
    Suggestion: add 'tools:replace="android:value"' to <meta-data> element at AndroidManifest.xml:17:9-20:15 to override. 

的build.gradleFacebook的代码提供了错误的同步

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' 
    }) 

    // FirebaseUI 


    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:10.2.0' 

    compile 'com.google.firebase:firebase-storage:10.2.0' 
    compile 'com.google.firebase:firebase-messaging:10.2.0' 
    compile 'com.google.firebase:firebase-config:10.2.0' 
    compile 'com.firebaseui:firebase-ui-auth:1.2.0' 
    compile 'com.github.bumptech.glide:glide:3.6.1' 
    compile 'com.android.support:multidex:1.0.1' 
    compile 'com.android.support:design:25.3.1' 
    compile 'com.facebook.android:facebook-android-sdk:4.+' 
    compile 'com.google.android.gms:play-services-auth:10.2.0' 
    compile 'com.google.firebase:firebase-auth:10.2.0' 
    testCompile 'junit:junit:4.12' 
} 
apply plugin: 'com.google.gms.google-services' 

AndroidManifest

<manifest xmlns:android="http://schemas.android.com/apk/res/android" 

    package="pritish.sawant.com.simplypubliccloud"> 

    <uses-permission android:name="android.permission.INTERNET" /> 



    <application 
     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"> 
     <meta-data 
      android:name="com.facebook.sdk.ApplicationId" 
      android:value="@string/facebook_app_id" 
      /> 

     <activity 
      android:name="com.facebook.FacebookActivity" 
      android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation" 
      android:label="@string/app_name" /> 
     <activity 
      android:name="com.facebook.CustomTabActivity" 
      android:exported="true"> 
      <intent-filter> 
       <action android:name="android.intent.action.VIEW" /> 

       <category android:name="android.intent.category.DEFAULT" /> 
       <category android:name="android.intent.category.BROWSABLE" /> 

       <data android:scheme="@string/fb_login_protocol_scheme" /> 
      </intent-filter> 
     </activity> 
     <activity android:name=".MainActivity"> 
      <intent-filter> 
       <action android:name="android.intent.action.MAIN" /> 

       <category android:name="android.intent.category.LAUNCHER" /> 
      </intent-filter> 
     </activity> 
     <activity android:name=".Image.ImageActivity" /> 
     <activity android:name=".Video.VideoActivity" /> 
     <activity android:name=".LoginSignUp.LoginActivity" /> 
     <activity android:name=".LoginSignUp.ResetPasswordActivity" /> 
     <activity android:name=".LoginSignUp.SignupActivity" /> 
     <activity android:name=".PhoneAuthentication.PhoneAuthenticationActivity"></activity> 
    </application> 

</manifest> 

什么我失踪?我还在我的应用以及Facebook登录中实施Firebase。我在我的项目的build.gradle中包含了url'https://maven.fabric.io/public'。我更新了我的谷歌存储库和Google Play服务。请帮忙。我不包括火力库的最新版本,否则我不断收到许多错误

回答

0

建议:添加“工具:更换=‘机器人:值’”以

您应该添加tools:replace

<?xml version="1.0" encoding="utf-8"?> 
<manifest xmlns:android="http://schemas.android.com/apk/res/android" 
xmlns:tools="http://schemas.android.com/tools" 
    > 

    <application 
     android:allowBackup="true" 
     ...... 
     tools:replace="allowBackup, label" 
     > 
+0

@LataSawant设置'Facebook的Android的SDK:4.16.0',而不是'Android的SDK:4 +' –

+0

@LataSawant评论'编译“com.google.android.gms:发挥服务-auth:10.2.0'' –

+0

@LataSawant切换到'26.0.1' –

相关问题