Android工作室中的清单合并失败

时间:2015-12-18 05:59:16

标签: android android-manifest

我在关于支付网关的项目中遇到了麻烦。根据EBS指南,我将模块导入我的项目并进行编译。但是当它构建时,它会给我错误说:“错误:任务执行失败”:app:processDebugManifest'。

  

清单合并失败:来自AndroidManifest.xml的属性应用程序@ icon value =(@ mipmap / ic_launcher):14:9-43       也出现在[VisionFresh:EBS_Live:unspecified] AndroidManifest.xml:22:9-45 value =(@ drawable / ic_launcher)。       建议:将'tools:replace =“android:icon”'添加到< application> AndroidManifest.xml中的元素:12:5-187:19覆盖。

这里是我的build.gradle: -

    apply plugin: 'com.android.application'

android {
    compileSdkVersion 23
    buildToolsVersion "23.0.2"

    defaultConfig {
        applicationId "visionfresh.android.catalyst.com.visionfresh"
        minSdkVersion 16
        targetSdkVersion 23
        versionCode 1
        versionName "1.0"
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }
    packagingOptions {
        exclude 'META-INF/DEPENDENCIES'
        exclude 'META-INF/NOTICE'
        exclude 'META-INF/LICENSE'
        exclude 'META-INF/LICENSE.txt'
        exclude 'META-INF/NOTICE.txt'
    }
}

dependencies {
    compile fileTree(include: ['*.jar'], dir: 'libs')
    testCompile 'junit:junit:4.12'
    compile 'com.android.support:appcompat-v7:23.1.1'
    compile files('libs/commons-net-3.0.1.jar')
    compile 'com.android.support:design:23.1.1'
    compile files('libs/fluent-hc-4.5.jar')
    compile files('libs/httpclient-4.5.jar')
    compile files('libs/httpclient-cache-4.5.jar')
    compile files('libs/httpclient-win-4.5.jar')
    compile files('libs/httpcore-4.4.1.jar')
    compile files('libs/httpmime-4.5.jar')
    compile files('libs/jna-4.1.0.jar')
    compile files('libs/jna-platform-4.1.0.jar')
    compile 'com.daimajia.slider:library:1.1.5@aar'
    compile 'com.squareup.picasso:picasso:2.3.2'
    compile 'com.nineoldandroids:library:2.4.0'
    compile files('libs/commons-net-3.0.1.jar')
    compile 'com.squareup.picasso:picasso:2.5.2'
    compile project(':EBS_Live')
}

这里是我的主要Manifest.xml: -

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


    <uses-permission android:name="android.permission.INTERNET" />
    <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
    <uses-permission android:name="android.permission.READ_PHONE_STATE"/>
    <uses-permission android:name="android.permission.GET_ACCOUNTS"/>

    <application
        android:allowBackup="true"
        android:icon="@mipmap/ic_launcher"
        android:label="@string/app_name"
        android:supportsRtl="true"
        android:theme="@style/AppTheme">
        <activity
            android:name=".SplashScreen"
            android:screenOrientation="portrait" >
            <intent-filter>
                <action android:name="android.intent.action.MAIN" />
                <category android:name="android.intent.category.LAUNCHER" />
            </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=".ShopByCategory"
            android:screenOrientation="portrait">
        </activity>
        <activity
            android:name=".LoginActivity"
            android:screenOrientation="portrait">
        </activity>
        <activity
            android:name=".SignUp"
            android:screenOrientation="portrait">
        </activity>
        <activity
            android:name=".TrackListActivity"
            android:screenOrientation="portrait">
        </activity>
        <activity
            android:name=".SingleTrackActivity"
            android:screenOrientation="portrait">
        </activity>
        <activity
            android:name=".ProductsCategory"
            android:screenOrientation="portrait">
        </activity>
        <activity
            android:name=".FilterClass"
            android:screenOrientation="portrait">
        </activity>
        <activity
            android:name=".SearchActivity"
            android:screenOrientation="portrait">
        </activity>
        <activity
            android:name=".ForgetPassword"
            android:screenOrientation="portrait">
        </activity>
        <activity
            android:name=".ProductsDetails"
            android:screenOrientation="portrait">
        </activity>
        <activity
            android:name=".Description"
            android:screenOrientation="portrait">
        </activity>
        <activity
            android:name=".AboutThisItem"
            android:screenOrientation="portrait">
        </activity>
        <activity
            android:name=".TouchOnImage"
            android:screenOrientation="portrait">
        </activity>
        <activity
            android:name=".MyAccount"
            android:screenOrientation="portrait">
        </activity>
        <activity
            android:name=".WishList"
            android:screenOrientation="portrait">
        </activity>
        <activity
            android:name=".ZoomLevel"
            android:screenOrientation="portrait">
        </activity>
        <activity
            android:name=".ChangePassword"
            android:screenOrientation="portrait">
        </activity>
        <activity
            android:name=".AccountInformation"
            android:screenOrientation="portrait">
        </activity>
        <activity
            android:name=".MyAddress"
            android:screenOrientation="portrait">
        </activity>
        <activity
            android:name=".Legal"
            android:screenOrientation="portrait">
        </activity>
        <activity
            android:name=".InnnerInformation"
            android:screenOrientation="portrait">
        </activity>
        <activity
            android:name=".Review"
            android:screenOrientation="portrait">
        </activity>
        <activity
            android:name=".Discount_Offer_View_All"
            android:screenOrientation="portrait">
        </activity>
        <activity
            android:name=".AnyOtherQuery"
            android:screenOrientation="portrait">
        </activity>
        <activity
            android:name=".FullScreenViewActivity"
            android:screenOrientation="portrait">
        </activity>
        <activity
            android:name=".CheckOut"
            android:screenOrientation="portrait">
        </activity>
        <activity
            android:name=".SubCategory"
            android:screenOrientation="portrait">
        </activity>
        <activity
            android:name=".ItemDetails"
            android:screenOrientation="portrait">
        </activity>
        <activity
            android:name=".MyOrder"
            android:screenOrientation="portrait">
        </activity>
        <activity
            android:name=".OrderDetail"
            android:screenOrientation="portrait">
        </activity>
        <activity
            android:name=".ReturnProducts"
            android:screenOrientation="portrait">
        </activity>
        <activity
            android:name=".BuyProduct"
            android:screenOrientation="portrait">
        </activity>
        <receiver android:name=".BuyProduct" >
            <intent-filter>
                <action android:name="android.intent.action.VIEW" />

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

                <data android:scheme="receiver" />
            </intent-filter>
        </receiver>
        <activity
            android:name=".PaymentSuccessActivity"
            android:label="@string/title_activity_payment_success"
            android:screenOrientation="portrait" >
            <intent-filter>
                <data
                    android:host="@string/hostname"
                    android:scheme="com.merchantapp.testkit" />

                <action android:name="android.intent.action.VIEW" />

                <category android:name="android.intent.category.DEFAULT" />
                <category android:name="android.intent.category.BROWSABLE" />
            </intent-filter>
        </activity>
    </application>
</manifest>

这里是EBS Manifest.xml: -

        <?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.ebs.android.sdk"
    android:versionCode="2"
    android:versionName="2.4" >

    <uses-sdk
        android:minSdkVersion="16"
        android:targetSdkVersion="23" />

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

    <android:uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />
    <android:uses-permission android:name="android.permission.READ_PHONE_STATE" />
    <android:uses-permission android:name="android.permission.READ_EXTERNAL_STORAGE" />
    <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

    <application
        tools:replace="icon,label,theme"
        android:allowBackup="true"
        android:icon="@drawable/ic_launcher"
        android:label="@string/app_name"
        android:theme="@style/AppTheme">
        <activity
            android:name=".PaymentDetails"
            android:label="@string/app_name"
            android:screenOrientation="portrait" >
        </activity>
        <activity
            android:name=".PaymentDetailActivity"
            android:label="@string/title_activity_payment_detail"
            android:screenOrientation="portrait" >
        </activity>
        <activity
            android:name=".PaymentActivity"
            android:label="@string/title_activity_payment"
            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustResize" >
        </activity>
        <activity
            android:name=".WebViewActivity"
            android:label="@string/title_activity_webview"

            android:screenOrientation="portrait"
            android:windowSoftInputMode="adjustResize" >
        </activity>
        <activity
            android:name=".EBSHomeConfigurableActivity"
            android:label="@string/title_activity_test__transaction_details"
            android:screenOrientation="portrait" >
        </activity>
        <activity
            android:name=".PaymentFailureActivity"
            android:label="@string/title_activity_payment_failure" >
        </activity>
        <activity
            android:name=".IdleTimeOut"
            android:label="@string/title_activity_idle_time_out" >
        </activity>
    </application>

</manifest>

这是我的第一个项目请帮帮我。提前谢谢!

1 个答案:

答案 0 :(得分:0)

尝试

dependencies {
    compile fileTree(dir: 'libs', include: '*.jar')
    compile project(':EBS')
}