在模块类中找到重复的类com.google.android.gms.location.places.zza

时间:2020-03-27 09:03:27

标签: android gradle android-gradle-plugin

应用标签标记文件在模块classes.jar(com.google.android.gms:play-services-places-placereport:15.0.1)中找到重复的类com.google.android.gms.location.places.zza和classes.jar(com.google.android.gms:play-services-places:11.8.0)。由于playservices library,我收到此错误。请帮助我

apply plugin: 'com.android.application'
    buildscript {
        ext.java_version = JavaVersion.VERSION_1_8
    }
    android {
        compileSdkVersion 29
        buildToolsVersion "29.0.3"
        defaultConfig {
            applicationId "com.enginecal.cai2w"
            minSdkVersion 21
            targetSdkVersion 29
            versionCode 1
            versionName "BI.1.2.1"
            multiDexEnabled true
            testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
        }

        dexOptions {
            javaMaxHeapSize "4g"
        }
        buildTypes {
            release {
                minifyEnabled true
                proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
            }
            debug {
                minifyEnabled false
            }
        }
        compileOptions {
            sourceCompatibility java_version
            targetCompatibility java_version
        }
        configurations.all {
            resolutionStrategy {
                force 'com.google.android.gms:play-services-basement:15.0.1'
            }
        }

    }
    /*implementation 'pl.droidsonroids.gif:android-gif-drawable:1.215'*/
    dependencies {
        implementation fileTree(include: ['*.jar'], dir: 'libs')
        implementation('com.google.android.gms:play-services:11.8.0') {
            force = true
        }
        implementation 'com.github.jakob-grabner:Circle-Progress-View:v1.2.9'
        implementation 'androidx.appcompat:appcompat:1.1.0'
        implementation 'com.google.android.material:material:1.1.0'
        implementation 'androidx.multidex:multidex:2.0.1'
        implementation 'androidx.legacy:legacy-support-v4:1.0.0'
        implementation 'androidx.legacy:legacy-support-v13:1.0.0'
        implementation 'androidx.cardview:cardview:1.0.0'
        implementation 'com.google.code.gson:gson:2.8.6'
        implementation 'com.squareup.retrofit2:retrofit:2.8.1'
        implementation 'com.squareup.retrofit2:converter-gson:2.8.1'
        implementation 'com.squareup.okio:okio:2.5.0'
        implementation 'com.pnikosis:materialish-progress:1.7'
        implementation 'de.greenrobot:eventbus:2.4.0'
        implementation 'com.squareup:android-times-square:1.7.10@aar'
        implementation 'com.github.lzyzsd:circleprogress:1.1.0@aar'
        implementation 'com.kbeanie:image-chooser-library:1.6.0@aar'
        implementation 'de.hdodenhof:circleimageview:3.1.0'
        implementation 'com.github.PhilJay:MPAndroidChart:v2.0.9'
        implementation 'me.relex:circleindicator:1.2.1@aar'
        api 'com.theartofdev.edmodo:android-image-cropper:2.8.+'
        implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
        implementation 'com.tomtom.online:sdk-maps:2.4438'
        /*  implementation 'com.tomtom.online:sdk-routing:2.4438'
         implementation 'com.tomtom.online:sdk-maps-driving-extensions:2.4438'*/
        testImplementation 'junit:junit:4.13'
       // apply plugin: 'com.google.gms.google-services'
    }

项目级gradle文件

ext {
    var = '1.215'
}// Top-level build file where you can add configuration options common to all sub-projects/modules.

buildscript {
    repositories {
        maven {
            url "https://maven.google.com"
        }
        maven {
            url "https://jitpack.io"
        }
        jcenter()
        google()
        mavenCentral()

    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.4.2'
        //classpath 'com.google.gms:google-services:3.2.1'
    }
}

allprojects {
    repositories {

        google()
        jcenter()
        maven { url "https://jitpack.io" }
        mavenCentral()
        maven {
            url "https://maven.tomtom.com:8443/nexus/content/repositories/releases/"
        }
    }
}

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

请帮助我,我有很多时间解决此错误。在此先感谢

0 个答案:

没有答案