2

私はCardViewRecyclerView依存関係を追加した後、コンパイルエラーを取得しています、私はすべてのポストをチェックしましたが、誰もがこの事件を解決するようです。実行はタスクに失敗しました:アプリ:processDebugManifest Androidのメーカー2.3.3

エラー:

Error:Execution failed for task ':app:processDebugManifest'. Manifest merger failed : Attribute meta-data#[email protected] value=(25.3.1) from [com.android.support:appcompat-v7:25.3.1] AndroidManifest.xml:27:9-31 is also present at [com.android.support:cardview-v7:26.0.0-alpha1] AndroidManifest.xml:24:9-38 value=(26.0.0-alpha1). Suggestion: add 'tools:replace="android:value"' to element at AndroidManifest.xml:25:5-27:34 to override.

マイBuild.Gradle:

apply plugin: 'com.android.application' 

android { 
    compileSdkVersion 25 
    buildToolsVersion "26.0.0" 
    defaultConfig { 
     applicationId "com.soft.kukito.cardviewprueba" 
     minSdkVersion 21 
     targetSdkVersion 25 
     versionCode 1 
     versionName "1.0" 
     testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner" 
    } 
    buildTypes { 
     release { 
      minifyEnabled false 
      proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 
     } 
    } 
} 

dependencies { 
    compile fileTree(include: ['*.jar'], dir: 'libs') 
    androidTestCompile('com.android.support.test.espresso:espresso-core:2.2.2', { 
     exclude group: 'com.android.support', module: 'support-annotations' 
    }) 
    compile 'com.android.support:appcompat-v7:25.3.1' 
    compile 'com.android.support.constraint:constraint-layout:1.0.2' 
    testCompile 'junit:junit:4.12' 
    compile 'com.android.support:cardview-v7:26.0.0-alpha1' 
    compile 'com.android.support:recyclerview-v7:26.0.0-alpha1' 
} 

答えるために皆に感謝します。

答えて

4

同じアンドロイドサポートライブラリのバージョンを使用する必要があります。サポートライブラリ26.0.0-alpha1バージョンを使用する必要があります。だから、次のように変更します。

compile 'com.android.support:appcompat-v7:25.3.1' 

compile 'com.android.support:appcompat-v7:26.0.0-alpha1' 

にまたバージョンにcompileSdkVersiontargetSdkVersionを変更する必要があります。

+0

私がそれを変更した場合、コンパイル後にLoollipopなどで動作しますか? – Natarr

+0

'minSdkVersion'で設定した最小sdkをサポートします。あなたの場合、 'minSdkVersion 21'と' targetSdkVersion 25'を使ってAndroidスタジオにAndroid Lollipop(5.0)をAndroid 7.1にサポートするプロジェクトをビルドするように指示します。 –

+0

ありがとうございました!出来た! – Natarr

関連する問題