- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
当我添加两个 (1.2.) 依赖项时,我得到 Manifest merger failed 错误。
依赖性提示如下:
- implementation 'com.karumi:dexter:5.0.0'
- implementation 'com.google.android.gms:play-services-maps:17.0.0'
我正在使用 android studio 3.4.1 + gradle 版本 5.1.1
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.example.houselocation"
minSdkVersion 14
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:2.0.0-beta2'
testImplementation 'junit:junit:4.13-beta-3'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.karumi:dexter:5.0.0'
implementation 'com.google.android.gms:play-services-maps:17.0.0'
}
All com.android.support libraries must use the exact same version specification (mixing versions can lead to runtime crashes). Found versions 28.0.0, 27.1.1. Examples include com.android.support:animated-vector-drawable:28.0.0 and com.android.support:design:27.1.1 less... (Ctrl+F1) Inspection info:There are some combinations of libraries, or tools and libraries, that are incompatible, or can lead to bugs. One such incompatibility is compiling with a version of the Android support libraries that is not the latest version (or in particular, a version lower than your targetSdkVersion). Issue id: GradleCompatible
Dependencies using groupId com.android.support and androidx.* can not be combined but found IdeMavenCoordinates{myGroupId='com.android.support', myArtifactId='support-vector-drawable', myVersion='28.0.0', myPacking='aar', myClassifier='null'} and IdeMavenCoordinates{myGroupId='androidx.cursoradapter', myArtifactId='cursoradapter', myVersion='1.0.0', myPacking='aar', myClassifier='null'} incompatible dependencies less... (Ctrl+F1) Inspection info:There are some combinations of libraries, or tools and libraries, that are incompatible, or can lead to bugs. One such incompatibility is compiling with a version of the Android support libraries that is not the latest version (or in particular, a version lower than your targetSdkVersion). Issue id: GradleCompatible
和 Gradle 同步问题
ERROR: Manifest merger failed : Attribute application@appComponentFactory value=(android.support.v4.app.CoreComponentFactory) from [com.android.support:support-compat:28.0.0] AndroidManifest.xml:22:18-91 is also present at [androidx.core:core:1.0.0] AndroidManifest.xml:22:18-86 value=(androidx.core.app.CoreComponentFactory). Suggestion: add 'tools:replace="android:appComponentFactory"' to element at AndroidManifest.xml:5:5-19:19 to override.
最佳答案
我试过这样, 从菜单栏中选择 Refactor > Migrate to AndroidX。它对我有用。有关更多信息,请查看此链接 https://developer.android.com/jetpack/androidx/migrate
关于android-studio - 添加一些依赖项后出现 GradleCompatible 错误?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57190663/
这个问题已经有答案了: Dependancy error when integrating android studio project with Firebase for a google sign
当我添加两个 (1.2.) 依赖项时,我得到 Manifest merger failed 错误。依赖性提示如下: implementation 'com.karumi:dexter:5.0.0' i
我使用的所有支持库都有版本:26.1.0,甚至那些来自 3rd 方依赖项的支持库也强制使用 resolutionStrategy 到 26.1.0 在 build.gradle 我有: compile
我是一名优秀的程序员,十分优秀!