Android 任务';的执行失败:应用程序:processDebugManifest
我想创建扩展Android 任务';的执行失败:应用程序:processDebugManifest,android,android-studio,android-recyclerview,android-gradle-plugin,Android,Android Studio,Android Recyclerview,Android Gradle Plugin,我想创建扩展RecyclerView.Adapter的适配器类,所以我需要将RecyclerView添加到gradle 在我转到Dependencies并搜索EecyclerView之后,它会显示“com.android.support:recyclerview-v7:26.0.0-alpha1” 而不是“com.android.support:appcompat-v7:25.3.1” 现在我该怎么办 在我添加“com.android.support:recyclerview-v7:26.0.0
RecyclerView.Adapter的适配器类,所以我需要将RecyclerView添加到gradle
在我转到Dependencies并搜索EecyclerView之后,它会显示“com.android.support:recyclerview-v7:26.0.0-alpha1”
而不是“com.android.support:appcompat-v7:25.3.1”
现在我该怎么办
在我添加“com.android.support:recyclerview-v7:26.0.0-alpha1”
之后,android studio消息Gradle build向我显示:
错误:任务“:app:processDebugManifest”的执行失败。
清单合并失败:属性元数据#android.support。VERSION@value值=(25.3.1)来自[com.android.support:appcompat-v7:25.3.1]AndroidManifest.xml:27:9-31
也出现在[com.android.support:recyclerview-v7:26.0.0-alpha1]AndroidManifest.xml:24:9-38 value=(26.0.0-alpha1)上。
建议:在AndroidManifest.xml:25:5-27:34处的元素中添加'tools:replace=“android:value”'以覆盖
请帮帮我 这是因为您有混合版本的支持库。您需要使用相同的支持库版本。如果模块build.gradle
中有appCompat库,请将其更改为与RecyclerView相同的版本。所以,应该是这样的:
dependencies {
...
// NEVER USE alpha version in your production code.
compile "com.android.support:recyclerview-v7:26.1.0"
compile "com.android.support:appcompat-v7:26.1.0"
}
如果在依赖项中找不到冲突的支持库,则意味着您的依赖项隐式地使用了支持库。在Linux中的终端中,使用以下命令从依赖项树中进行检查:
./gradlew app:dependencies
或者,如果您使用的是Windows,请在命令提示符下尝试以下操作:
gradlew.bat app:dependencies
然后,在找到冲突的支持库后,需要使用以下方法将其排除:
compile('com.library.name:version') {
exclude group: 'com.android.support'
//exclude module: 'appcompat-v7'
}
这是因为您有混合版本的支持库。您需要使用相同的支持库版本。如果模块build.gradle
中有appCompat库,请将其更改为与RecyclerView相同的版本。所以,应该是这样的:
dependencies {
...
// NEVER USE alpha version in your production code.
compile "com.android.support:recyclerview-v7:26.1.0"
compile "com.android.support:appcompat-v7:26.1.0"
}
如果在依赖项中找不到冲突的支持库,则意味着您的依赖项隐式地使用了支持库。在Linux中的终端中,使用以下命令从依赖项树中进行检查:
./gradlew app:dependencies
或者,如果您使用的是Windows,请在命令提示符下尝试以下操作:
gradlew.bat app:dependencies
然后,在找到冲突的支持库后,需要使用以下方法将其排除:
compile('com.library.name:version') {
exclude group: 'com.android.support'
//exclude module: 'appcompat-v7'
}
在我的例子中,错误是因为alpha库:implementation'androidx。安全:安全加密:1.0.0-alpha02
在我的例子中,错误是因为alpha库:implementation'androidx。安全:安全加密:1.0.0-alpha02