Android app manifest failed to merge Facebook and firebase
•
Android
I'm developing a social application (Facebook and firebase)
Once I add the firebase gradle path, I receive this error:
Error:Execution Failed for task ':app:processDebugManifest'.
Build.gradle file:
compile 'com.firebaseui:firebase-ui:0.6.0'
compile 'com.facebook.android:facebook-android-sdk:4.0.0'
Mainfest file
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="com.friendture.apps.android.friendture">
<uses-permission android:name="android.permission.SEND_SMS" />
<uses-permission android:name="android.permission.RECEIVE_SMS" />
<uses-permission android:name="android.permission.INTERNET" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="com.google.android.providers.gsf.permission.READ_GSERVICES" />
<application
android:name=".Init"
android:allowBackup="true"
tools:replace="android:theme"
android:icon="@mipmap/ic_launcher"
android:label="@string/app_name"
android:supportsRtl="true"
android:theme="@style/AppTheme">
<Meta-data
android:name="com.google.android.geo.API_KEY"
android:value="*****" />
<Meta-data
android:name="com.facebook.sdk.ApplicationId"
android:value="******" />
<activity android:name=".Activity.SplashScreenActivity">
<intent-filter>
<action android:name="android.intent.action.MAIN" />
<category android:name="android.intent.category.LAUNCHER" />
</intent-filter>
</activity>
<activity
android:name=".Activity.ProfileActivity"
android:label="@string/title_activity_profile" />
<activity
android:name="com.facebook.FacebookActivity"
android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
android:label="@string/app_name"
android:theme="@android:style/Theme.Translucent.NoTitleBar" />
<activity android:name=".Activity.PasswordActivity" />
<activity android:name=".Activity.SelectFromListActivity" />
<activity android:name=".Activity.CompleteFacebookActivity"></activity>
</application>
resolvent:
This error has occurred since we added firebase UI auth to our project. If it is not fixed correctly, it will cause Facebook activity to crash!
To fix it, update the manifest (note the new "tools" attribute):
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:tools="http://schemas.android.com/tools"
package="YOUR_PACKAGE">
<!-- Facebook API Key -->
<Meta-data
tools:replace="android:value"
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:launchMode="singleInstance"
android:screenOrientation="portrait"/>
The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
二维码