Android:元数据也存在于

标签 android android-gradle-plugin

Android 开发新手,遇到这个错误。不知道哪里出了问题。

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

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

enter image description here

enter image description here enter image description here

最佳答案

您需要使用相同版本的支持库,要么使用 25.3.1 和所有 com.android.support 依赖项,要么使用 26.0.0-alpha1。

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

或者两者之一

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

关于Android:元数据也存在于,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46671680/

相关文章:

android - 程序类型已存在 : com. android.volley.Cache$Entry

java服务器将字符串数组列表发送到android客户端

java - 错误循环

java - Gba请求 : Constructor Called 222 userAgent Apache-HttpClient/UNAVAILABLE Parsing XML File

java - 安卓工作室 Gradle : Execute static Java Method (Migration from ANT to Gradle)

Android Gradle 库构建 : Include & exclude files from the jar inside the generated aar

android - 如何单元测试 FragmentDialog 和实现接口(interface)的 Activity 之间的交互

android - WCF 服务 <-> 具有快速更新的 WPF/iOS/Android 客户端通信

java - Android Studio 安装报错: supplied java-home seems to be invalid

Android Studio Gradle 构建问题(无法运行项目)