android studio错误执行任务执行失败':app:processDebugManifest'

时间:2017-07-20 00:31:42

标签: android xml android-studio android-gradle android-manifest

我导入了一个现有项目,它有效,我删除了它并试图重新导入它,这是我得到的错误:

  

错误:任务':app:processDebugManifest'执行失败。   清单合并失败:[com.android.support:customtabs:25.3.1] AndroidManifest.xml:24:9-31中的属性meta-data#android.support.VERSION@value value =(25.3.1)       也出现在[com.android.support:appcompat-v7:26.0.0-alpha1] AndroidManifest.xml:27:9-38 value =(26.0.0-alpha1)。       建议:添加'工具:replace =" android:value"'到AndroidManifest.xml:22:5-24:34的元素覆盖。

这是我的清单

<?xml version="1.0" encoding="utf-8"?>

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

<application
    android:name="com.orm.SugarApp"
    android:allowBackup="true"
    android:icon="@drawable/logo_molfix"
    android:label="Molfix"
    android:supportsRtl="true"
    android:theme="@style/AppTheme">
    <meta-data
        android:name="DATABASE"
        android:value="molfix.db"
        />
    <meta-data
        android:name="VERSION"
        android:value="2" />
    <meta-data
        android:name="QUERY_LOG"
        android:value="true" />
    <meta-data
        android:name="DOMAIN_PACKAGE_NAME"
        android:value="molfix.dev.molfix" />
    <meta-data
        android:name="com.facebook.sdk.ApplicationId"
        android:value="@string/facebook_app_id" />

    <activity android:name=".Activities.MainActivity" >
        android:screenOrientation="portrait"
        android:theme="@style/AppTheme.NoActionBar"
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
    <activity
        android:name=".Activities.Bvn.BienvenuActivity"
        android:screenOrientation="portrait"
        android:theme="@style/AppTheme.NoActionBar" />
    <activity
        android:name=".Activities.Bvn.ConnexionActivity"
        android:theme="@style/AppTheme.NoActionBar" />
    <activity
        android:name=".Activities.Bvn.InscriptionActivity"
        android:theme="@style/AppTheme.NoActionBar" />
    <activity
        android:name=".Activities.Menu.MenuPActivity"
        android:theme="@style/AppTheme.NoActionBar" />
    <activity
        android:name=".Activities.Menu.BBEnRoute.Trs.TrsBBActivity"
        android:theme="@style/AppTheme.NoActionBar" />
    <activity
        android:name=".Activities.Menu.BBEnRoute.Trs.TrsMamanActivity"
        android:theme="@style/AppTheme.NoActionBar" />
    <activity
        android:name=".Activities.Menu.BBEnRoute.BBERActivity"
        android:theme="@style/AppTheme.NoActionBar" />
    <activity
        android:name=".Activities.Menu.BBEnRoute.Calendar.CalendrierActivity"
        android:theme="@style/AppTheme.NoActionBar" />
    <activity
        android:name=".Activities.Menu.BBEnRoute.Trs.TrsActivity"
        android:theme="@style/AppTheme.NoActionBar" />
    <activity
        android:name="com.facebook.FacebookActivity"
        android:configChanges="keyboard|keyboardHidden|screenLayout|screenSize|orientation"
        android:label="@string/app_name" />
    <activity
        android:name=".Activities.Menu.BBEnRoute.Calendar.BBCalendarActivity"
        android:theme="@style/AppTheme.NoActionBar" />
    <activity android:name=".Activities.testwebActivity" />
    <activity
        android:name=".Activities.Menu.BBEnRoute.Calendar.MamanCalendarActivity"
        android:theme="@style/AppTheme.NoActionBar" />
    <activity
        android:name=".Activities.Menu.BBEnRoute.Prenom.PrenomsActivity"
        android:label="@string/title_activity_prenoms"
        android:theme="@style/AppTheme.NoActionBar" />
    <activity
        android:name=".Activities.Menu.BBEnRoute.Calendar.MamCalAllActivity"
        android:theme="@style/AppTheme.NoActionBar" />
    <activity
        android:name=".Activities.Menu.BBEnRoute.Calendar.BebeCalendarActivity"
        android:theme="@style/AppTheme.NoActionBar" />
    <activity
        android:name=".Activities.Menu.BBEnRoute.Prenom.PrenomGarcActivity"
        android:theme="@style/AppTheme.NoActionBar" />
    <activity
        android:name=".Activities.Menu.BBEnRoute.Prenom.PrenomFilleActivity"
        android:theme="@style/AppTheme.NoActionBar" />
    <activity
        android:name=".Activities.Menu.BBEnRoute.Calendar.BBCalAllActivity"
        android:theme="@style/AppTheme.NoActionBar" />
    <activity
        android:name=".Activities.Menu.BBEnRoute.Prenom.PrenomSpecActivity"
        android:theme="@style/AppTheme.NoActionBar" />
    <activity
        android:name=".Activities.Menu.BBEnRoute.Calendar.SemaineActivity"
        android:theme="@style/AppTheme.NoActionBar" />
    <activity
        android:name="Activities.MainActivity"
        android:configChanges="orientation|keyboardHidden|screenSize"
        android:label="@string/app_name"
        android:theme="@style/FullscreenTheme" >
        <intent-filter>
            <action android:name="android.intent.action.MAIN" />

            <category android:name="android.intent.category.LAUNCHER" />
        </intent-filter>
    </activity>
</application>

1 个答案:

答案 0 :(得分:0)

您的支持库版本存在冲突。您在支持lib上使用测试版:

implementation 'com.android.support:appcompat-v7:26.0.0-beta1'

和自定义标签的稳定版本:

implementation 'com.android.support:customtabs:25.3.1'

您需要使用相同的支持库版本来避免此类问题:

implementation 'com.android.support:appcompat-v7:26.0.0-beta1'
implementation 'com.android.support:customtabs:26.0.0-beta1'

希望这有帮助。