Search Unity

Facebook Unity SDK Android integration - Cannot merge android manifests

Discussion in 'Editor & General Support' started by mickee, Sep 1, 2017.

  1. mickee

    mickee

    Joined:
    Dec 26, 2013
    Posts:
    7
    Hi,

    I spent a lot of time searching for answers but cannot find any solution.
    I am trying to integrate Facebook SDK to 7.10.0 in Unity 5.6.1f1.

    I have setup Facebook Settings correctly. Every Facebook feature works fine in the editor. (Previously I used 7.9.0 / Unity 5.4.1 and everything worked fine on android). I can compile when removing Facebook generated manifest, but Facebook features don't work.

    Here is my Plugins/Android/AndroidManifest.xml file :
    Code (CSharp):
    1.  
    2. <?xml version="1.0" encoding="utf-8"?>
    3. <manifest xmlns:android="http://schemas.android.com/apk/res/android" package="com.unity3d.player" android:installLocation="preferExternal" android:theme="@android:style/Theme.NoTitleBar" android:versionCode="1" android:versionName="1.0">
    4.   <supports-screens android:smallScreens="true" android:normalScreens="true" android:largeScreens="true" android:xlargeScreens="true" android:anyDensity="true" />
    5.   <application android:icon="@drawable/app_icon" android:label="@string/app_name" android:debuggable="true">
    6.     <activity android:name="com.unity3d.player.UnityPlayerNativeActivity" android:launchMode="singleTask" android:label="@string/app_name" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen">
    7.       <intent-filter>
    8.         <action android:name="android.intent.action.MAIN" />
    9.         <category android:name="android.intent.category.LAUNCHER" />
    10.       </intent-filter>
    11.       <meta-data android:name="unityplayer.ForwardNativeEventsToDalvik" android:value="false" />
    12.     </activity>
    13.     <activity android:name="com.facebook.unity.FBUnityLoginActivity" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
    14.     <activity android:name="com.facebook.LoginActivity" android:screenOrientation="portrait" android:configChanges="keyboardHidden|orientation" android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen">
    15.     </activity>
    16.     <activity android:name="com.facebook.unity.FBUnityDeepLinkingActivity" android:exported="true" />
    17.     <meta-data android:name="com.facebook.sdk.ApplicationId" android:value="fb596157827168029" />
    18.     <activity android:name="com.facebook.unity.FBUnityDialogsActivity" android:configChanges="fontScale|keyboard|keyboardHidden|locale|mnc|mcc|navigation|orientation|screenLayout|screenSize|smallestScreenSize|uiMode|touchscreen" android:theme="@android:style/Theme.Translucent.NoTitleBar.Fullscreen" />
    19.     <activity android:name="com.facebook.unity.FBUnityAppLinkActivity" android:exported="true" />
    20.     <activity android:name="com.facebook.unity.FBUnityGameRequestActivity" />
    21.     <activity android:name="com.facebook.unity.FBUnityCreateGameGroupActivity" />
    22.     <activity android:name="com.facebook.unity.FBUnityJoinGameGroupActivity" />
    23.     <activity android:name="com.facebook.unity.AppInviteDialogActivity" />
    24.     <provider android:name="com.facebook.FacebookContentProvider" android:authorities="com.facebook.app.FacebookContentProvider596157827168029" android:exported="true" />
    25.   </application>
    26. </manifest>
    27.  

    When trying to build for Android, I get the following error :
    "Unable to merge android manifests"
    > "Error: Error while saving blame file, build will continue
    Error: Le prefixe "tools" de l'attribut "tools:eek:verrideLibrary" associe a un type d'element "uses-sdk" n'est pas lie."

    One other fact is, in Facebook Unity SDK getting started for Android (https://developers.facebook.com/docs/unity/getting-started/android), I see I should set Min API level to level 15 but I cannot see it in Player settings (but I installed it in Android Manager) as Unity 5.6.x targets Min API >15. I tried specifying a uses-sdk min sdk version of 16 in the manifest.

    Please help me I am stuck on this issue for days,

    Thanks in advance,
    Michael
     
  2. liortal

    liortal

    Joined:
    Oct 17, 2012
    Posts:
    3,234
    Were you able to resolve this issue ?