2016-10-17 2 views
0

I Facebook SDKManifest Fusion gescheitert mit mehreren Fehlern nach dem Hinzufügen Facebook SDK

implementiert
dependencies { 
compile 'com.facebook.android:facebook-android-sdk:4.16.1' 
} 

Und meine ändern meine mindSdkVersion 14 bis 15 Ursache es Select API 15: Android 4.0.3 or higher and create your new project.

in dem Dokument gesagt wurde
defaultConfig { 
    applicationId "com.myapp.myapplication" 
    minSdkVersion 15 
    targetSdkVersion 23 
    multiDexEnabled true 
} 

nach folgenden die Schritte, denen ich diesen Fehler Manifest merger failed with multiple errors begegnet, wie man das löst?

* Update

Ich habe meine neu erstellen class App, die hier zu Application im Manifest erweitert wird meine Klasse

public class MyApplication extends Application { 

@Override 
public void onCreate() { 
    super.onCreate(); 
    // Initialize the SDK before executing any other operations, 
    FacebookSdk.sdkInitialize(getApplicationContext()); 
    AppEventsLogger.activateApp(this); 
} 
} 

und so habe ich es in meinem Manifest

<application 
    android:allowBackup="true" 
    android:icon="@drawable/ic_launcher" 
    android:label="@string/app_name" 
    android:theme="@style/AppTheme" 
    android:name="com.myapp.myapplication.MyApplication"> 

ändern android:name="android.support.multidex.MultiDexApplication" zu com.myapp.myapplication.MyApplication

und diesen

Error:Execution failed for task ':app:processDebugManifest'.> Manifest merger failed : Attribute activity#[email protected] value=(@android:style/Theme.Translucent.NoTitleBar) from AndroidManifest.xml:388:13-72 
is also present at [com.facebook.android:facebook-android-sdk:4.16.1] AndroidManifest.xml:32:13-63 value=(@style/com_facebook_activity_theme). 
Suggestion: add 'tools:replace="android:theme"' to <activity> element at AndroidManifest.xml:385:13-389:48 to override. 
+0

siehe http://stackoverflow.com/questions/24506800/android-studio-gradle-icon- angetroffen error-manifest-merger – sasikumar

+0

plz logcat hier setzen – dipali

+0

@dipali es zeigt keinen fehler im logcat – natsumiyu

Antwort

0

In Manifest, ich neu ordnen, um die Position zu

<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" 
     android:screenOrientation="portrait"/> 

<provider android:authorities="com.facebook.app.FacebookContentProvider" 
     android:name="com.facebook.FacebookContentProvider" 
     android:exported="true" /> 
Verwandte Themen