RocketChat / Rocket.Chat.Cordova

Rocket.Chat Cross-Platform Mobile Application via Cordova (DEPRECATED)
MIT License
104 stars 109 forks source link

Android build fails: Manifest merger failed : Attribute activity#com.facebook.FacebookActivity@theme value=(@android:style/Theme.Translucent.NoTitleBar) #174

Open migscabral opened 7 years ago

migscabral commented 7 years ago

I followed the solutions as instructed in #151 and #138, but still I get the same error:

BUILD FAILED

Total time: 5.675 secs
Error: /Users/migscabral/Documents/work/8layer/communic8/rocketchat/mobile-cordova/platforms/android/gradlew: Command failed with exit code 1 Error output:
/Users/migscabral/Documents/work/8layer/communic8/rocketchat/mobile-cordova/platforms/android/AndroidManifest.xml:50:184-243 Error:
    Attribute activity#com.facebook.FacebookActivity@theme value=(@android:style/Theme.Translucent.NoTitleBar) from AndroidManifest.xml:50:184-243
    is also present at [com.facebook.android:facebook-android-sdk:4.19.0] AndroidManifest.xml:32:13-63 value=(@style/com_facebook_activity_theme).
    Suggestion: add 'tools:replace="android:theme"' to <activity> element at AndroidManifest.xml:50:9-246 to override.

Am I missing anything?

Here's my updated config.xml:

<?xml version='1.0' encoding='utf-8'?>
<widget android-versionCode="243" id="com.konecty.rocket.chat" ios-CFBundleVersion="13" version="2.5.0" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:cdv="http://cordova.apache.org/ns/1.0">
    <name>Rocket.Chat</name>
    <description>
        Rocket.Chat mobile application
    </description>
    <author email="support@rocket.chat" href="http://rocket.chat">
        Rocket.Chat
    </author>
    <content src="index.html" />
    <allow-intent href="http://*/*" />
    <allow-intent href="https://*/*" />
    <allow-intent href="tel:*" />
    <allow-intent href="geo:*" />
    <allow-intent href="mailto:*" />
    <allow-intent href="sms:*" />
    <allow-intent href="market:*" />
    <access launch-external="true" origin="tel:*" />
    <access launch-external="true" origin="geo:*" />
    <access launch-external="true" origin="mailto:*" />
    <access launch-external="true" origin="sms:*" />
    <access launch-external="true" origin="market:*" />
    <access origin="file:*" />
    <access origin="blob:*" />
    <access origin="cdv:*" />
    <access origin="gap:*" />
    <access origin="*" />
    <allow-navigation href="http://*/*" />
    <allow-navigation href="https://*/*" />
    <allow-navigation href="data:*" />
    <platform name="android">
        <preference name="android-minSdkVersion" value="15" />
        <icon density="mdpi" src="resources/icons/platform/android/res/drawable-mdpi/appicon.png" />
        <icon density="hdpi" src="resources/icons/platform/android/res/drawable-hdpi/appicon.png" />
        <icon density="xhdpi" src="resources/icons/platform/android/res/drawable-xhdpi/appicon.png" />
        <icon density="xxhdpi" src="resources/icons/platform/android/res/drawable-xxhdpi/appicon.png" />
        <icon density="xxxhdpi" src="resources/icons/platform/android/res/drawable-xxxhdpi/appicon.png" />
        <splash density="port-mdpi" height="480" src="resources/splash/Resources/android/images/res-long-port-mdpi/default.png" width="320" />
        <splash density="port-hdpi" height="800" src="resources/splash/Resources/android/images/res-long-port-hdpi/default.png" width="480" />
        <splash density="port-xhdpi" height="960" src="resources/splash/Resources/android/images/res-long-port-xhdpi/default.png" width="640" />
        <splash density="port-xxhdpi" height="1600" src="resources/splash/Resources/android/images/res-long-port-xxhdpi/default.png" width="960" />
        <splash density="port-xxxhdpi" height="1920" src="resources/splash/Resources/android/images/res-long-port-xxxhdpi/default.png" width="1280" />
        <splash density="land-mdpi" height="320" src="resources/splash/Resources/android/images/res-long-land-mdpi/default.png" width="480" />
        <splash density="land-hdpi" height="480" src="resources/splash/Resources/android/images/res-long-land-hdpi/default.png" width="800" />
        <splash density="land-xhdpi" height="640" src="resources/splash/Resources/android/images/res-long-land-xhdpi/default.png" width="960" />
        <splash density="land-xxhdpi" height="960" src="resources/splash/Resources/android/images/res-long-land-xxhdpi/default.png" width="1600" />
        <splash density="land-xxxhdpi" height="1280" src="resources/splash/Resources/android/images/res-long-land-xxxhdpi/default.png" width="1920" />
        <preference name="Orientation" value="default" />
        <config-file parent="/*" target="AndroidManifest.xml">
            <uses-permission android:name="android.permission.RECORD_AUDIO" />
            <uses-permission android:name="android.permission.RECORD_VIDEO" />
            <uses-permission android:name="android.permission.CAMERA" />
        </config-file>
    </platform>
    <platform name="ios">
        <allow-intent href="itms:*" />
        <allow-intent href="itms-apps:*" />
        <icon height="29" src="resources/icons/Resources/iphone/appicon-Small.png" width="29" />
        <icon height="40" src="resources/icons/Resources/iphone/appicon-Small-40.png" width="40" />
        <icon height="50" src="resources/icons/Resources/iphone/appicon-Small-50.png" width="50" />
        <icon height="57" src="resources/icons/Resources/iphone/appicon.png" width="57" />
        <icon height="58" src="resources/icons/Resources/iphone/appicon-Small@2x.png" width="58" />
        <icon height="60" src="resources/icons/Resources/iphone/appicon-60.png" width="60" />
        <icon height="72" src="resources/icons/Resources/iphone/appicon-72.png" width="72" />
        <icon height="76" src="resources/icons/Resources/iphone/appicon-76.png" width="76" />
        <icon height="80" src="resources/icons/Resources/iphone/appicon-Small-40@2x.png" width="80" />
        <icon height="87" src="resources/icons/Resources/iphone/appicon-Small@3x.png" width="87" />
        <icon height="100" src="resources/icons/Resources/iphone/appicon-Small-50@2x.png" width="100" />
        <icon height="114" src="resources/icons/Resources/iphone/appicon@2x.png" width="114" />
        <icon height="120" src="resources/icons/Resources/iphone/appicon-60@2x.png" width="120" />
        <icon height="144" src="resources/icons/Resources/iphone/appicon-72@2x.png" width="144" />
        <icon height="152" src="resources/icons/Resources/iphone/appicon-76@2x.png" width="152" />
        <icon height="167" src="resources/icons/Resources/iphone/appicon-83.5@2x.png" width="167" />
        <icon height="180" src="resources/icons/Resources/iphone/appicon-60@3x.png" width="180" />
        <splash height="480" src="resources/splash/Resources/iphone/Default.png" width="320" />
        <splash height="960" src="resources/splash/Resources/iphone/Default@2x.png" width="640" />
        <splash height="1136" src="resources/splash/Resources/iphone/Default-568h@2x.png" width="640" />
        <splash height="1334" src="resources/splash/Resources/iphone/Default-667h@2x.png" width="750" />
        <splash height="2208" src="resources/splash/Resources/iphone/Default-Portrait-736h@3x.png" width="1242" />
        <splash height="1242" src="resources/splash/Resources/iphone/Default-Landscape-736h@3x.png" width="2208" />
        <splash height="1024" src="resources/splash/Resources/iphone/Default-Portrait.png" width="768" />
        <splash height="2048" src="resources/splash/Resources/iphone/Default-Portrait@2x.png" width="1536" />
        <splash height="768" src="resources/splash/Resources/iphone/Default-Landscape.png" width="1024" />
        <splash height="1536" src="resources/splash/Resources/iphone/Default-Landscape@2x.png" width="2048" />
        <preference name="Orientation" value="all" />
        <config-file parent="ITSAppUsesNonExemptEncryption" platform="ios" target="*-Info.plist">
            <false />
        </config-file>
        <config-file parent="LSApplicationQueriesSchemes" platform="ios" target="*-Info.plist">
            <array>
                <string>fbauth</string>
            </array>
        </config-file>
        <config-file parent="NSAppTransportSecurity" platform="ios" target="*-Info.plist">
            <dict>
                <key>NSAllowsArbitraryLoads</key>
                <true />
            </dict>
        </config-file>
        <config-file parent="UIApplicationShortcutItems" platform="ios" target="*-Info.plist">
            <array>
                <dict>
                    <key>UIApplicationShortcutItemIconType</key>
                    <string>UIApplicationShortcutIconTypeAdd</string>
                    <key>UIApplicationShortcutItemTitle</key>
                    <string>Add new server</string>
                    <key>UIApplicationShortcutItemType</key>
                    <string>new</string>
                </dict>
            </array>
        </config-file>
    </platform>
    <preference name="webviewbounce" value="false" />
    <preference name="DisallowOverscroll" value="true" />
    <preference name="AutoHideSplashScreen" value="false" />
    <preference name="ShowSplashScreenSpinner" value="false" />
    <preference name="StatusBarOverlaysWebView" value="false" />
    <preference name="FadeSplashScreen" value="false" />
    <preference name="StatusBarStyle" value="blackopaque" />
    <preference name="StatusBarBackgroundColor" value="#000000" />
    <preference name="deployment-target" value="9.0" />
    <preference name="AndroidLaunchMode" value="singleTask" />
    <hook src="hooks/beforePrepare.js" type="before_prepare" />
    <engine name="android" spec="5.2.2" />
    <engine name="ios" spec="4.3.1" />
    <plugin name="com.meteor.cordova-update" spec="https://github.com/RocketChat/com.meteor.cordova-update" />
    <plugin name="com.verso.cordova.clipboard" spec="https://github.com/VersoSolutions/CordovaClipboard" />
    <plugin name="cordova-sharingreceptor" spec="https://github.com/burstaholic/cordova-sharingreceptor" />
    <plugin name="cordova-plugin-1password" spec="0.1.5" />
    <plugin name="cordova-plugin-3dtouch" spec="~1.3.5" />
    <plugin name="cordova-plugin-actionsheet" spec="~2.3.1" />
    <plugin name="cordova-plugin-appinfo" spec="2.1.0" />
    <plugin name="cordova-plugin-camera" spec="~2.3.1" />
    <plugin name="cordova-plugin-console" spec="1.0.5" />
    <plugin name="cordova-plugin-device" spec="1.1.4" />
    <plugin name="cordova-plugin-dialogs" spec="1.3.1" />
    <plugin name="cordova-plugin-file" spec="4.3.1" />
    <plugin name="cordova-plugin-file-transfer" spec="1.6.1" />
    <plugin name="cordova-plugin-geolocation" spec="~2.4.1" />
    <plugin name="cordova-plugin-inappbrowser" spec="1.5.0" />
    <plugin name="cordova-plugin-legacy-whitelist" spec="1.1.2" />
    <plugin name="cordova-plugin-media" spec="~2.4.1" />
    <plugin name="cordova-plugin-media-capture" spec="~1.4.1" />
    <plugin name="cordova-plugin-splashscreen" spec="4.0.1" />
    <plugin name="cordova-plugin-statusbar" spec="2.2.1" />
    <plugin name="cordova-plugin-x-socialsharing" spec="~5.1.3" />
    <plugin name="ionic-plugin-keyboard" spec="2.2.1" />
    <plugin name="phonegap-plugin-push" spec="~1.4.2" />
    <plugin name="cordova-plugin-facebook4" spec="1.7.4">
        <variable name="APP_ID" value="835103589938459" />
        <variable name="APP_NAME" value="Rocket.Chat" />
    </plugin>
    <plugin name="twitter-connect-plugin" spec="~0.6.0">
        <variable name="FABRIC_KEY" value="d28a3f04738fd742320f2ae1f2049bf85a5a6144" />
    </plugin>
    <preference name="TwitterConsumerKey" value="njl2I82AXrOo0YftZyKHyC8aV" />
    <preference name="TwitterConsumerSecret" value="2RmFsMIZmOXY4mMQ1qTuoOOcOPDVtgNMbJLPFgigaYTPpQuVVQ" />
    <plugin name="cordova-plugin-googleplus" spec="~5.1.1">
        <variable name="REVERSED_CLIENT_ID" value="com.googleusercontent.apps.673693445664-pa3k48sg81r89rn65e9rlnu4gpmm5vem" />
    </plugin>
    <plugin name="cordova-custom-config" spec="~3.1.2" />
    <plugin name="cordova-plugin-customurlscheme" spec="~4.2.0">
        <variable name="URL_SCHEME" value="clientapp-rocketchat" />
    </plugin>
</widget>

Here's the generated AndroidManifest.xml:

<?xml version='1.0' encoding='utf-8'?>
<widget android-versionCode="243" id="com.konecty.rocket.chat" ios-CFBundleVersion="13" version="2.5.0" xmlns="http://www.w3.org/ns/widgets" xmlns:android="http://schemas.android.com/apk/res/android" xmlns:cdv="http://cordova.apache.org/ns/1.0">
    <name>Rocket.Chat</name>
    <description>
        Rocket.Chat mobile application
    </description>
    <author email="support@rocket.chat" href="http://rocket.chat">
        Rocket.Chat
    </author>
    <content src="index.html" />
    <allow-intent href="http://*/*" />
    <allow-intent href="https://*/*" />
    <allow-intent href="tel:*" />
    <allow-intent href="geo:*" />
    <allow-intent href="mailto:*" />
    <allow-intent href="sms:*" />
    <allow-intent href="market:*" />
    <access launch-external="true" origin="tel:*" />
    <access launch-external="true" origin="geo:*" />
    <access launch-external="true" origin="mailto:*" />
    <access launch-external="true" origin="sms:*" />
    <access launch-external="true" origin="market:*" />
    <access origin="file:*" />
    <access origin="blob:*" />
    <access origin="cdv:*" />
    <access origin="gap:*" />
    <access origin="*" />
    <allow-navigation href="http://*/*" />
    <allow-navigation href="https://*/*" />
    <allow-navigation href="data:*" />
    <platform name="android">
        <preference name="android-minSdkVersion" value="15" />
        <icon density="mdpi" src="resources/icons/platform/android/res/drawable-mdpi/appicon.png" />
        <icon density="hdpi" src="resources/icons/platform/android/res/drawable-hdpi/appicon.png" />
        <icon density="xhdpi" src="resources/icons/platform/android/res/drawable-xhdpi/appicon.png" />
        <icon density="xxhdpi" src="resources/icons/platform/android/res/drawable-xxhdpi/appicon.png" />
        <icon density="xxxhdpi" src="resources/icons/platform/android/res/drawable-xxxhdpi/appicon.png" />
        <splash density="port-mdpi" height="480" src="resources/splash/Resources/android/images/res-long-port-mdpi/default.png" width="320" />
        <splash density="port-hdpi" height="800" src="resources/splash/Resources/android/images/res-long-port-hdpi/default.png" width="480" />
        <splash density="port-xhdpi" height="960" src="resources/splash/Resources/android/images/res-long-port-xhdpi/default.png" width="640" />
        <splash density="port-xxhdpi" height="1600" src="resources/splash/Resources/android/images/res-long-port-xxhdpi/default.png" width="960" />
        <splash density="port-xxxhdpi" height="1920" src="resources/splash/Resources/android/images/res-long-port-xxxhdpi/default.png" width="1280" />
        <splash density="land-mdpi" height="320" src="resources/splash/Resources/android/images/res-long-land-mdpi/default.png" width="480" />
        <splash density="land-hdpi" height="480" src="resources/splash/Resources/android/images/res-long-land-hdpi/default.png" width="800" />
        <splash density="land-xhdpi" height="640" src="resources/splash/Resources/android/images/res-long-land-xhdpi/default.png" width="960" />
        <splash density="land-xxhdpi" height="960" src="resources/splash/Resources/android/images/res-long-land-xxhdpi/default.png" width="1600" />
        <splash density="land-xxxhdpi" height="1280" src="resources/splash/Resources/android/images/res-long-land-xxxhdpi/default.png" width="1920" />
        <preference name="Orientation" value="default" />
        <config-file parent="/*" target="AndroidManifest.xml">
            <uses-permission android:name="android.permission.RECORD_AUDIO" />
            <uses-permission android:name="android.permission.RECORD_VIDEO" />
            <uses-permission android:name="android.permission.CAMERA" />
        </config-file>
    </platform>
    <platform name="ios">
        <allow-intent href="itms:*" />
        <allow-intent href="itms-apps:*" />
        <icon height="29" src="resources/icons/Resources/iphone/appicon-Small.png" width="29" />
        <icon height="40" src="resources/icons/Resources/iphone/appicon-Small-40.png" width="40" />
        <icon height="50" src="resources/icons/Resources/iphone/appicon-Small-50.png" width="50" />
        <icon height="57" src="resources/icons/Resources/iphone/appicon.png" width="57" />
        <icon height="58" src="resources/icons/Resources/iphone/appicon-Small@2x.png" width="58" />
        <icon height="60" src="resources/icons/Resources/iphone/appicon-60.png" width="60" />
        <icon height="72" src="resources/icons/Resources/iphone/appicon-72.png" width="72" />
        <icon height="76" src="resources/icons/Resources/iphone/appicon-76.png" width="76" />
        <icon height="80" src="resources/icons/Resources/iphone/appicon-Small-40@2x.png" width="80" />
        <icon height="87" src="resources/icons/Resources/iphone/appicon-Small@3x.png" width="87" />
        <icon height="100" src="resources/icons/Resources/iphone/appicon-Small-50@2x.png" width="100" />
        <icon height="114" src="resources/icons/Resources/iphone/appicon@2x.png" width="114" />
        <icon height="120" src="resources/icons/Resources/iphone/appicon-60@2x.png" width="120" />
        <icon height="144" src="resources/icons/Resources/iphone/appicon-72@2x.png" width="144" />
        <icon height="152" src="resources/icons/Resources/iphone/appicon-76@2x.png" width="152" />
        <icon height="167" src="resources/icons/Resources/iphone/appicon-83.5@2x.png" width="167" />
        <icon height="180" src="resources/icons/Resources/iphone/appicon-60@3x.png" width="180" />
        <splash height="480" src="resources/splash/Resources/iphone/Default.png" width="320" />
        <splash height="960" src="resources/splash/Resources/iphone/Default@2x.png" width="640" />
        <splash height="1136" src="resources/splash/Resources/iphone/Default-568h@2x.png" width="640" />
        <splash height="1334" src="resources/splash/Resources/iphone/Default-667h@2x.png" width="750" />
        <splash height="2208" src="resources/splash/Resources/iphone/Default-Portrait-736h@3x.png" width="1242" />
        <splash height="1242" src="resources/splash/Resources/iphone/Default-Landscape-736h@3x.png" width="2208" />
        <splash height="1024" src="resources/splash/Resources/iphone/Default-Portrait.png" width="768" />
        <splash height="2048" src="resources/splash/Resources/iphone/Default-Portrait@2x.png" width="1536" />
        <splash height="768" src="resources/splash/Resources/iphone/Default-Landscape.png" width="1024" />
        <splash height="1536" src="resources/splash/Resources/iphone/Default-Landscape@2x.png" width="2048" />
        <preference name="Orientation" value="all" />
        <config-file parent="ITSAppUsesNonExemptEncryption" platform="ios" target="*-Info.plist">
            <false />
        </config-file>
        <config-file parent="LSApplicationQueriesSchemes" platform="ios" target="*-Info.plist">
            <array>
                <string>fbauth</string>
            </array>
        </config-file>
        <config-file parent="NSAppTransportSecurity" platform="ios" target="*-Info.plist">
            <dict>
                <key>NSAllowsArbitraryLoads</key>
                <true />
            </dict>
        </config-file>
        <config-file parent="UIApplicationShortcutItems" platform="ios" target="*-Info.plist">
            <array>
                <dict>
                    <key>UIApplicationShortcutItemIconType</key>
                    <string>UIApplicationShortcutIconTypeAdd</string>
                    <key>UIApplicationShortcutItemTitle</key>
                    <string>Add new server</string>
                    <key>UIApplicationShortcutItemType</key>
                    <string>new</string>
                </dict>
            </array>
        </config-file>
    </platform>
    <preference name="webviewbounce" value="false" />
    <preference name="DisallowOverscroll" value="true" />
    <preference name="AutoHideSplashScreen" value="false" />
    <preference name="ShowSplashScreenSpinner" value="false" />
    <preference name="StatusBarOverlaysWebView" value="false" />
    <preference name="FadeSplashScreen" value="false" />
    <preference name="StatusBarStyle" value="blackopaque" />
    <preference name="StatusBarBackgroundColor" value="#000000" />
    <preference name="deployment-target" value="9.0" />
    <preference name="AndroidLaunchMode" value="singleTask" />
    <hook src="hooks/beforePrepare.js" type="before_prepare" />
    <engine name="android" spec="5.2.2" />
    <engine name="ios" spec="4.3.1" />
    <plugin name="com.meteor.cordova-update" spec="https://github.com/RocketChat/com.meteor.cordova-update" />
    <plugin name="com.verso.cordova.clipboard" spec="https://github.com/VersoSolutions/CordovaClipboard" />
    <plugin name="cordova-sharingreceptor" spec="https://github.com/burstaholic/cordova-sharingreceptor" />
    <plugin name="cordova-plugin-1password" spec="0.1.5" />
    <plugin name="cordova-plugin-3dtouch" spec="~1.3.5" />
    <plugin name="cordova-plugin-actionsheet" spec="~2.3.1" />
    <plugin name="cordova-plugin-appinfo" spec="2.1.0" />
    <plugin name="cordova-plugin-camera" spec="~2.3.1" />
    <plugin name="cordova-plugin-console" spec="1.0.5" />
    <plugin name="cordova-plugin-device" spec="1.1.4" />
    <plugin name="cordova-plugin-dialogs" spec="1.3.1" />
    <plugin name="cordova-plugin-file" spec="4.3.1" />
    <plugin name="cordova-plugin-file-transfer" spec="1.6.1" />
    <plugin name="cordova-plugin-geolocation" spec="~2.4.1" />
    <plugin name="cordova-plugin-inappbrowser" spec="1.5.0" />
    <plugin name="cordova-plugin-legacy-whitelist" spec="1.1.2" />
    <plugin name="cordova-plugin-media" spec="~2.4.1" />
    <plugin name="cordova-plugin-media-capture" spec="~1.4.1" />
    <plugin name="cordova-plugin-splashscreen" spec="4.0.1" />
    <plugin name="cordova-plugin-statusbar" spec="2.2.1" />
    <plugin name="cordova-plugin-x-socialsharing" spec="~5.1.3" />
    <plugin name="ionic-plugin-keyboard" spec="2.2.1" />
    <plugin name="phonegap-plugin-push" spec="~1.4.2" />
    <plugin name="cordova-plugin-facebook4" spec="1.7.4">
        <variable name="APP_ID" value="835103589938459" />
        <variable name="APP_NAME" value="Rocket.Chat" />
    </plugin>
    <plugin name="twitter-connect-plugin" spec="~0.6.0">
        <variable name="FABRIC_KEY" value="d28a3f04738fd742320f2ae1f2049bf85a5a6144" />
    </plugin>
    <preference name="TwitterConsumerKey" value="njl2I82AXrOo0YftZyKHyC8aV" />
    <preference name="TwitterConsumerSecret" value="2RmFsMIZmOXY4mMQ1qTuoOOcOPDVtgNMbJLPFgigaYTPpQuVVQ" />
    <plugin name="cordova-plugin-googleplus" spec="~5.1.1">
        <variable name="REVERSED_CLIENT_ID" value="com.googleusercontent.apps.673693445664-pa3k48sg81r89rn65e9rlnu4gpmm5vem" />
    </plugin>
    <plugin name="cordova-custom-config" spec="~3.1.2" />
    <plugin name="cordova-plugin-customurlscheme" spec="~4.2.0">
        <variable name="URL_SCHEME" value="clientapp-rocketchat" />
    </plugin>
</widget>