错误程序类型已存在:com.google.android.gms.measurement.AppMeasurementReceiver

时间:2018-07-30 15:21:44

标签: android google-maps firebase google-api firebase-cloud-messaging

尝试更新Google Maps和Firebase API的依存关系时出现错误,并且我无法重新构建该项目,有人可以告诉我我在做什么错吗?我已经有了Firebase和该应用所需的Google Play服务库的最新依赖项。

这是我的项目级别gradle。

buildscript {
repositories {
    jcenter()
    maven { url 'https://maven.fabric.io/public' }
    google()
    maven {
        url 'https://github.com/uPhyca/stetho-realm/raw/master/maven- 
repo'
    }
  }
 dependencies {
    classpath 'com.android.tools.build:gradle:3.1.3'
    classpath 'com.google.gms:google-services:4.0.2'
    classpath 'io.fabric.tools:gradle:1.25.4'
    classpath "io.realm:realm-gradle-plugin:5.3.0"
  }
 }


 allprojects {
   repositories {
    jcenter()
    google()
    mavenCentral()
    maven {
        url 'https://maven.google.com/'
       }
   }
}

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

现在这是我的应用级别gradle:

apply plugin: 'com.android.application'
apply plugin: 'realm-android'
apply plugin: 'io.fabric'

repositories {
maven { url 'https://maven.fabric.io/public' }
}


repositories {
jcenter()

mavenCentral()
maven {
    url 'https://github.com/uPhyca/stetho-realm/raw/master/maven-repo'
}

maven {
    url "https://mint.splunk.com/gradle/"
}

maven {
    url 'https://dl.bintray.com/intercom/intercom-maven'
}
}

android {
compileSdkVersion 23
buildToolsVersion '27.0.3'

defaultConfig {
    applicationId "com.drivin.mobile.app"
    minSdkVersion 18
    targetSdkVersion 23
    versionCode 240
    versionName "2.4.0"
    testInstrumentationRunner "android.test.InstrumentationTestRunner"
    multiDexEnabled true
}
signingConfigs {
    release {
        storeFile file('drivin.keystore')
        storePassword '-----'
        keyAlias '-----'
        keyPassword '-----'
    }
}
compileOptions {
    sourceCompatibility JavaVersion.VERSION_1_7
    targetCompatibility JavaVersion.VERSION_1_7
}
buildTypes {
    release {
        minifyEnabled false
        proguardFiles getDefaultProguardFile('proguard-android.txt'), 
'proguard-rules.pro'

        signingConfig signingConfigs.release
    }
}
flavorDimensions "version"
productFlavors {
    qa {
        dimension "version"
        applicationId "com.drivin.mobile.app.qa"
        versionNameSuffix "-qa"

    }
    production {
        dimension "version"
        applicationId "com.drivin.mobile.app"
        signingConfig signingConfigs.release
    }
}

packagingOptions {
    exclude 'META-INF/DEPENDENCIES'
    exclude 'META-INF/NOTICE'
    exclude 'META-INF/LICENSE'
    exclude 'META-INF/LICENSE.txt'
    exclude 'META-INF/NOTICE.txt'
}

dexOptions {
    // Prevent OutOfMemory with MultiDex during the build phase
    javaMaxHeapSize "4g"
}

}

realm {
syncEnabled = true
}

dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation('com.mapbox.mapboxsdk:mapbox-android-sdk:3.2.0@aar') {
    transitive = true
}
implementation('com.crashlytics.sdk.android:crashlytics:2.9.3') {
    transitive = true;
}
implementation('io.intercom.android:intercom-sdk:1.+@aar') {
    transitive = true
}
implementation 'com.google.code.gson:gson:2.8.0'
implementation 'com.squareup.picasso:picasso:2.3.2'
implementation 'com.nineoldandroids:library:2.4.0'
implementation 'com.daimajia.slider:library:1.1.5@aar'
implementation 'com.android.support:support-v4:23.4.0'
implementation 'com.amazonaws:aws-android-sdk-mobileanalytics:2.2.+'
implementation 'com.android.support:appcompat-v7:23.4.0'
implementation 'com.android.support:design:23.4.0'
implementation 'com.google.android.gms:play-services-location:15.0.1'
implementation 'com.google.android.gms:play-services-maps:15.0.1'

implementation 'com.amazonaws:aws-android-sdk-iot:+'
implementation 'com.github.woxthebox:draglistview:1.4.2'
implementation 'com.amazonaws:aws-android-sdk-core:2.2.+'
implementation 'com.amazonaws:aws-android-sdk-s3:2.2.+'
implementation 'com.amazonaws:aws-android-sdk-ddb:2.2.+'
implementation 'com.fasterxml.jackson.core:jackson-core:2.4.1'
implementation 'com.fasterxml.jackson.core:jackson-annotations:2.4.1'
implementation 'com.fasterxml.jackson.core:jackson-databind:2.4.1'
implementation 'com.mcxiaoke.volley:library:1.0.19'
implementation 'com.google.maps.android:android-maps-utils:0.5+'
implementation 'com.android.support:multidex:1.0.3'
implementation 'me.dm7.barcodescanner:zxing:1.9.8'
implementation 'com.google.firebase:firebase-core:16.0.1'
implementation 'com.google.firebase:firebase-messaging:17.1.0'
implementation 'com.squareup.retrofit2:retrofit:2.3.0'
implementation 'com.squareup.okhttp3:logging-interceptor:3.10.0'
implementation 'com.google.code.gson:gson:2.8.1'
implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
implementation 'com.android.support.constraint:constraint- 
       layout:1.0.2'
implementation 'com.facebook.stetho:stetho:1.5.0'
implementation 'com.uphyca:stetho_realm:2.1.0'
implementation 'io.realm:android-adapters:2.1.1'
compileOnly project(':com.symbol.emdk')
}
apply plugin: 'com.google.gms.google-services'

0 个答案:

没有答案