我得到一個編譯錯誤,我已經檢查每一個崗位,但似乎沒有人來解決這種情況。執行失敗的任務:應用程序:將<strong>CardView</strong>和<strong>RecyclerView</strong>依賴後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'
}
感謝大家回答。
如果我改變了,它會在編譯後在Loollipop中起作用嗎? – Natarr
它將支持您在'minSdkVersion'中設置的最小sdk。在你的情況下,你使用'minSdkVersion 21'和'targetSdkVersion 25'告訴Android Studio建立項目以支持Android棒棒糖(5.0)到Android 7.1 –
非常感謝!有效! – Natarr