其他各种库都在请求库com.google.android.gms:play-services-measurement-base

时间:2018-10-14 06:39:39

标签: android firebase

因此对编程和学习仍然是新手 我创建一个应用程序并将其连接到Firebase 我完全按照firebase的指示执行操作,并且出现此错误

The library com.google.android.gms:play-services-measurement-base is being 
requested by various other libraries at [[15.0.2,15.0.2], [16.0.2,16.0.2]], but 
resolves to 16.0.2. Disable the plugin and check your dependencies tree using 
./gradlew :app:dependencies.

我知道该主题中有相同​​的帖子,并且我已经对其进行了彻底搜索并按照该步骤进行操作,但是没有类似的帖子解决方案有效,请您帮我吗?

这是我的构建gradle

// Top-level build file where you can add configuration options common to 
all sub-projects/modules.

buildscript {
repositories {
    jcenter()
    google()
}
dependencies {
    classpath 'com.android.tools.build:gradle:3.1.4'
    classpath 'com.google.gms:google-services:3.3.0'
    classpath 'com.google.gms:google-services:4.0.1'

    // NOTE: Do not place your application dependencies here; they belong
    // in the individual module build.gradle files
}
}

allprojects {
repositories {
    jcenter()
    google()
}
}

task clean(type: Delete) {
delete rootProject.buildDir
}

这也是,我不确定是哪个问题

buildscript {
repositories {
}

}
apply plugin: 'com.android.application'

android {
compileSdkVersion 27
buildToolsVersion '27.0.3'

defaultConfig {
    applicationId "com.rozdoum.socialcomponents"
    minSdkVersion 17
    targetSdkVersion 27
    versionCode 27
    versionName "2.0"
    testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
    vectorDrawables.useSupportLibrary = true
}

buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
    }
}
compileOptions {
    targetCompatibility 1.8
    sourceCompatibility 1.8
}
}

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')

// Support libraries
implementation 'com.android.support:support-v4:27.1.1'
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:animated-vector-drawable:27.1.1'
implementation 'com.android.support:customtabs:27.1.1'
implementation 'com.android.support:design:27.1.1'
implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'com.google.firebase:firebase-core:16.0.3'

// Firebase
implementation 'com.google.firebase:firebase-core:15.0.2'
implementation 'com.google.firebase:firebase-database:15.0.1'
implementation 'com.google.firebase:firebase-auth:15.1.0'
implementation 'com.google.firebase:firebase-storage:15.0.2'
implementation 'com.google.firebase:firebase-messaging:15.0.2'
implementation 'com.google.firebase:firebase-auth:15.1.0'

// MVP
implementation 'com.hannesdorfmann.mosby3:mvp:3.1.0' // Plain MVP

// Social
implementation 'com.google.android.gms:play-services-auth:15.0.1'
implementation 'com.facebook.android:facebook-android-sdk:4.17.0'

// Images
implementation 'com.github.bumptech.glide:glide:4.6.1'
annotationProcessor 'com.github.bumptech.glide:compiler:4.6.1'
implementation 'com.theartofdev.edmodo:android-image-cropper:2.6.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
}

apply plugin: 'com.google.gms.google-services'

1 个答案:

答案 0 :(得分:0)

删除 从项目级别的Gradle文件中classpath 'com.google.gms:google-services:3.3.0'升级所有Firebase依赖项到最新版本。