我的Android项目有问题,我无法构建,这是我的错误:
无法通知依赖项解析侦听器.图书馆com.google.android.gms:play-services-measurement-base正在[[15.0.2,15.0.2],[15.0.4,15.0.4]]的各种其他图书馆提出要求,但已解决为15.0.4.禁用插件并使用./gradlew:app:dependencies检查依赖关系树.
我尝试了许多不同的解决方案,但问题仍然存在.我在项目根目录上的gradle文件中有正确的依赖项和存储库:
dependencies {
classpath 'com.android.tools.build:gradle:3.1.2'
classpath 'com.google.gms:google-services:4.0.1'
}
Run Code Online (Sandbox Code Playgroud)
和
repositories {
jcenter()
mavenLocal()
mavenCentral()
maven {
url "https://maven.google.com"
}
}
Run Code Online (Sandbox Code Playgroud)
在我的应用程序gradle上,我有以下依赖项:
implementation "com.google.android.gms:play-services-maps:15.0.1"
implementation "com.google.android.gms:play-services-places:15.0.1"
implementation "com.google.android.gms:play-services-gcm:15.0.1"
implementation "com.google.android.gms:play-services-location:15.0.1"
implementation "com.google.android.gms:play-services-analytics:15.0.2"
implementation "com.google.android.gms:play-services-auth:15.0.1"
implementation "com.google.android.gms:play-services-tagmanager:15.0.2"
implementation "com.google.firebase:firebase-core:16.0.0"
Run Code Online (Sandbox Code Playgroud)
一些建议?
解决方案是更新以下依赖项:
implementation "com.google.android.gms:play-services-analytics:16.0.0"
implementation "com.google.android.gms:play-services-tagmanager:16.0.0"
Run Code Online (Sandbox Code Playgroud) android gradle google-play-services android-studio android-gradle-plugin
我今天开始收到此错误,昨天一切正常,gradle或firebase版本没有变化
com.google.firebase库:firebase-iid正在[[17.0.0,17.0.0]]的各个其他库请求,但解析为16.2.0.禁用插件并使用./gradlew:app:dependencies检查依赖关系树.
我看到昨天是谷歌服务插件的更新,可能是导致问题.
如何解决这个问题?
android google-play-services android-gradle-plugin react-native react-native-android
今天更新根文件夹中的播放服务后,我面临以下问题.我很困惑如何解决这个问题.
有人可以帮我解决这个问题吗?
这个错误很刺激.我不知道冲突在哪里.顺便说一下,为什么它显示冲突而没有版本相互关联.
错误:
图书馆com.google.android.gms:play-services-measurement-base正在[[15.0.0,15.0.0],[15.0.2,15.0.2]]的其他各个图书馆请求,但已解决为15.0.2.禁用插件并使用./gradlew:app:dependencies检查依赖关系树.
build.gradle脚本:
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
configurations.all {
resolutionStrategy.force 'com.google.code.findbugs:jsr305:1.3.9'
}
compileSdkVersion 27
buildToolsVersion '27.0.3'
defaultConfig {
applicationId "community.infinity"
minSdkVersion 16
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
aaptOptions {
cruncherEnabled = false
}
dexOptions {
preDexLibraries false
javaMaxHeapSize "4g"
}
buildTypes {
release {
minifyEnabled true
shrinkResources true
proguardFiles getDefaultProguardFile('proguard- android.txt'), 'proguard-rules.pro'
}
debug {
ext.enableCrashlytics = false
}
}
compileOptions {
targetCompatibility 1.8
sourceCompatibility …Run Code Online (Sandbox Code Playgroud) 我'com.android.support:support-v4:23.3.0'在使用我的build.gradle但是在探索外部库时,我看到了两个版本的support-v4库(23.3.0和24.0.0).如何找到哪个依赖项使用support-v4:24.0.0库?如何强制gradle只添加版本23.3.0?
这是我在build.gradle中的依赖列表:
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:23.3.0'
compile 'com.android.support:support-v4:23.3.0'
compile 'com.android.support:design:23.3.0'
compile 'com.android.support:recyclerview-v7:23.3.0'
compile 'com.android.support:cardview-v7:23.3.0'
compile ('com.nightonke:wowoviewpager:1.0.2') {
exclude group: 'com.android.support', module:'support-v4'
}
compile ('com.j256.ormlite:ormlite-android:5.0'){
exclude group: 'com.android.support', module:'support-v4'
}
compile files('libs/picasso-2.5.2.jar')
compile files('libs/easyandroidanimationslibrary-v0.5.jar')
compile files('libs/apache-httpcomponents-httpclient.jar')
compile files('libs/apache-httpcomponents-httpcore.jar')
compile 'co.ronash.android:pushe-base:1.2.0'
compile 'com.google.android.gms:play-services-gcm:9.4.0'
compile('com.github.ozodrukh:CircularReveal:2.0.1@aar') {
transitive = true;
}
compile files('libs/btsdk.jar')
compile project(':zxing_barcode') // this project include the same version of support-v4 library
compile project(':cropper')// this project include the same version of support-v4 …Run Code Online (Sandbox Code Playgroud) android gradle android-studio support-v4 gradle-dependencies
当我尝试运行我的应用程序时,出现此构建错误Android Studio.
Execution failed for task ':app:checkDebugDuplicateClasses'.
> 1 exception was raised by workers:
java.lang.RuntimeException: java.lang.RuntimeException: Duplicate class com.google.android.gms.internal.measurement.zzbs found in modules jetified-play-services-measurement-18.0.1-runtime.jar (com.google.android.gms:play-services-measurement:18.0.1) and jetified-play-services-measurement-sdk-api-18.0.3-runtime.jar (com.google.android.gms:play-services-measurement-sdk-api:18.0.3)
Duplicate class com.google.android.gms.internal.measurement.zzl found in modules jetified-play-services-measurement-impl-18.0.1-runtime.jar (com.google.android.gms:play-services-measurement-impl:18.0.1) and jetified-play-services-measurement-sdk-api-18.0.3-runtime.jar (com.google.android.gms:play-services-measurement-sdk-api:18.0.3)
Duplicate class com.google.android.gms.measurement.internal.zzfh found in modules jetified-play-services-measurement-base-18.0.3-runtime.jar (com.google.android.gms:play-services-measurement-base:18.0.3) and jetified-play-services-measurement-impl-18.0.1-runtime.jar (com.google.android.gms:play-services-measurement-impl:18.0.1)
Duplicate class com.google.android.gms.measurement.internal.zzgl found in modules jetified-play-services-measurement-18.0.1-runtime.jar (com.google.android.gms:play-services-measurement:18.0.1) and jetified-play-services-measurement-base-18.0.3-runtime.jar (com.google.android.gms:play-services-measurement-base:18.0.3)
Duplicate class com.google.android.gms.measurement.internal.zzgm found in modules jetified-play-services-measurement-18.0.1-runtime.jar (com.google.android.gms:play-services-measurement:18.0.1) and jetified-play-services-measurement-base-18.0.3-runtime.jar (com.google.android.gms:play-services-measurement-base:18.0.3)
Duplicate class com.google.android.gms.measurement.internal.zzgn found in modules jetified-play-services-measurement-18.0.1-runtime.jar (com.google.android.gms:play-services-measurement:18.0.1) …Run Code Online (Sandbox Code Playgroud) 错误:无法通知依赖项解析侦听器.图书馆com.google.android.gms:play-services-measurement-base正在[[15.0.2,15.0.2],[15.0.4,15.0.4]]的各种其他图书馆提出要求,但已解决为15.0.4.禁用插件并使用./gradlew:app:dependencies检查依赖关系树.
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "com.intraday.geeks"
minSdkVersion 21
targetSdkVersion 26
versionCode 1
versionName "1.0"
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.1.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.1'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
compile 'com.android.support:design:26.1.0'
implementation 'com.google.firebase:firebase-core:15.0.4'
implementation 'com.google.android.gms:play-services-location:15.0.4'
implementation 'com.google.firebase:firebase-ads:15.0.1'
implementation 'com.google.firebase:firebase-core:16.0.0'
implementation 'com.google.firebase:firebase-auth:16.0.0'
implementation 'com.firebaseui:firebase-ui:0.6.2'
}
apply plugin: 'com.google.gms.google-services'
Run Code Online (Sandbox Code Playgroud) android firebase firebase-authentication firebase-realtime-database firebase-cloud-messaging