ano*_*ous 34 android firebase google-play-services build.gradle
今天更新根文件夹中的播放服务后,我面临以下问题.我很困惑如何解决这个问题.
有人可以帮我解决这个问题吗?
这个错误很刺激.我不知道冲突在哪里.顺便说一下,为什么它显示冲突而没有版本相互关联.
错误:
图书馆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 1.8
}
}
dependencies {
implementation 'com.google.firebase:firebase-core:15.0.0'
implementation 'com.google.firebase:firebase-messaging:15.0.0'
implementation fileTree(include: ['*.jar'], dir: 'libs')
androidTestImplementation('com.android.support.test.espresso:espresso-core:2.2.2', {
exclude group: 'com.android.support'
exclude module: 'support-annotations'
exclude module: 'support-v4'
exclude module: 'support-v13'
exclude module: 'recyclerview-v7'
exclude group: 'com.android.support', module: 'appcompat-v7'
})
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'com.android.support:support-v4:27.1.1'
implementation 'de.hdodenhof:circleimageview:2.1.0'
implementation 'com.adamstyrc.cookiecutter:cookie-cutter:1.0.2'
implementation 'com.allattentionhere:fabulousfilter:0.0.5'
implementation 'com.github.florent37:diagonallayout:1.0.6'
implementation 'com.flaviofaria:kenburnsview:1.0.7'
implementation 'com.vstechlab.easyfonts:easyfonts:1.0.0'
implementation 'com.google.code.gson:gson:2.8.0'
implementation 'com.github.pwittchen:swipe:0.1.0'
implementation 'com.thesurix.gesturerecycler:gesture-recycler:1.4.0'
implementation 'com.github.iammert:MaterialIntroView:1.6.0'
implementation 'com.github.oxoooo:touch-image-view:1.0.1'
implementation 'com.github.deano2390:MaterialShowcaseView:1.2.0'
implementation 'com.squareup.okhttp:okhttp-urlconnection:1.6.0'
implementation('io.socket:socket.io-client:0.8.3') {
// excluding org.json which is provided by Android
exclude group: 'org.json', module: 'json'
}
implementation 'com.google.gms:google-services:3.3.0'
implementation 'com.iceteck.silicompressorr:silicompressor:2.1'
implementation 'com.fenchtose.nocropper:nocropper:0.2.0'
implementation 'me.relex:circleindicator:1.2.2@aar'
implementation('com.google.guava:guava:23.4-android') {
exclude group: 'com.android.support'
exclude module: 'support-annotations'
exclude module: 'support-v4'
exclude module: 'support-v13'
exclude module: 'recyclerview-v7'
exclude group: 'com.android.support', module: 'appcompat-v7'
}
implementation 'com.github.amlcurran.showcaseview:library:5.4.3'
implementation 'com.orhanobut:hawk:2.0.1'
implementation 'com.zsoltsafrany:needle:1.0.0'
implementation 'com.github.madrapps:pikolo:1.1.6'
implementation 'jp.wasabeef:richeditor-android:1.2.2'
implementation 'com.android.support:palette-v7:27.1.1'
testImplementation 'junit:junit:4.12'
implementation('com.github.bumptech.glide:glide:4.4.0') {
transitive = true
}
implementation ("com.github.bumptech.glide:recyclerview-integration:4.4.0") {
// Excludes the support library because it's already included by Glide.
transitive = false
}
annotationProcessor 'com.github.bumptech.glide:compiler:4.4.0'
implementation 'com.android.support:multidex:1.0.3'
implementation "me.leolin:ShortcutBadger:1.1.21@aar"
implementation 'com.hbb20:ccp:2.1.2'
}
Run Code Online (Sandbox Code Playgroud)
Khe*_*raj 35
你的一个依赖是拥有不同的版本com.google.android.gms.
与过去不同,Firebase依赖项具有独立版本.如果您有版本冲突,那么您可以更新您的
com.google.gms:google-services.并开始定义独立版本.
com.google.gms:google-services转到顶部(项目)级别build.gradle并更新
com.google.gms:google-services到版本4.1.0或更新版本(如果可用).
buildscript {
...
dependencies {
classpath 'com.android.tools.build:gradle:3.2.0'
classpath 'com.google.gms:google-services:4.1.0' //< update this
}
}
Run Code Online (Sandbox Code Playgroud)
Firebase依赖版本可以是单独的.所以检查最新版本.
com.google.firebase:firebase-core:16.0.3 //Analytics
com.google.firebase:firebase-database:16.0.2 //Realtime Database
Run Code Online (Sandbox Code Playgroud)
解决方法:
如何查看使用哪个依赖项com.google.android.gms?
对于Android,请使用此行
gradle app:dependencies
Run Code Online (Sandbox Code Playgroud)
或者如果你有一个gradle包装器:
./gradlew app:dependencies
Run Code Online (Sandbox Code Playgroud)
app你的项目模块在哪里
另外,如果你想检查某些东西是否compile与testCompilevs androidTestCompile依赖以及拉入的内容:
./gradlew :app:dependencyInsight --configuration compile --dependency <name>
./gradlew :app:dependencyInsight --configuration testCompile --dependency <name>
./gradlew :app:dependencyInsight --configuration androidTestCompile --dependency <name>
Run Code Online (Sandbox Code Playgroud)
Gradle View是一个Android Studio插件,您可以安装并显示依赖关系层次结构. 方法Count是另一个插件,它还显示依赖树.
Ter*_*ius 12
试试这个对我有用。
将此添加到您的build.gradle文件末尾
com.google.gms.googleservices.GoogleServicesPlugin.config.disableVersionCheck = true
Run Code Online (Sandbox Code Playgroud)
Firebase Android SDK 现在具有独立的版本号,允许更频繁,更灵活的更新.
将google play gradle插件版本更新为最新版本,目前为3.3.0.
classpath 'com.google.gms:google-services:3.3.0'
Run Code Online (Sandbox Code Playgroud)
并将库更新到最新版本.
Firebase Core com.google.firebase:firebase-core:15.0.2
Ads com.google.firebase:firebase-ads:15.0.0
Analytics com.google.firebase:firebase-analytics:15.0.2
App Indexing com.google.firebase:firebase-appindexing:15.0.0
Authentication com.google.firebase:firebase-auth:15.1.0
Cloud Firestore com.google.firebase:firebase-firestore:16.0.0
Cloud Functions com.google.firebase:firebase-functions:15.0.0
Cloud Messaging com.google.firebase:firebase-messaging:15.0.2
Cloud Storage com.google.firebase:firebase-storage:15.0.2
Crash Reporting com.google.firebase:firebase-crash:15.0.2
Crashlytics com.crashlytics.sdk.android:crashlytics:2.9.1
Invites com.google.firebase:firebase-invites:15.0.2
Performance Monitoring com.google.firebase:firebase-perf:15.1.0
Realtime Database com.google.firebase:firebase-database:15.0.0
Remote Config com.google.firebase:firebase-config:15.0.2
Run Code Online (Sandbox Code Playgroud)
另据报道至少使用版本15.0.2:
您需要将后一个依赖项的版本更新为15.0.2.这解决了Google Services Gradle插件版本3.3.0报告的问题:com.google.android.gms库:play-services-measurement-base正在[[15.0.0,15.0]的各种其他库请求. 0],[15.0.2,15.0.2]],但解析为15.0.2 ......
| 归档时间: |
|
| 查看次数: |
57543 次 |
| 最近记录: |