简体   繁体   English

com.android.dex.DexException:多个dex文件定义了Lcom / google / android / gms / location / places / PlaceReport;

[英]com.android.dex.DexException: Multiple dex files define Lcom/google/android/gms/location/places/PlaceReport;

In the gradle I have added the following dependencies which get synched! 在gradle中,我添加了以下依赖项,它们可以同步!

apply plugin: 'com.android.application'

android {
compileSdkVersion 22
buildToolsVersion "22.0.1"

defaultConfig {
    applicationId "com.example.panagiotis.lalakis"
    minSdkVersion 16
    targetSdkVersion 22
    versionCode 1
    versionName "1.0"

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

 dependencies
      {
            compile fileTree(dir: 'libs', include: ['*.jar'])
            compile 'com.android.volley:volley:1.0.0'
            compile 'com.android.support:appcompat-v7:22.2.1'
            compile 'com.google.android.gms:play-services-maps:9.4.0'
            compile 'com.google.android.gms:play-services-location:8.4.0'
            compile 'com.google.maps.android:android-maps-utils:0.5'
    }

No error is marked in the coding process but when I try to build the project I get the following error 在编码过程中未标记任何错误,但是当我尝试构建项目时,出现以下错误

 com.android.dex.DexException: Multiple dex files define 
 Lcom/google/android/gms/location/places/PlaceReport;

I understand that there is a conflict but I do not know how to fix it and the articles online are scarce and not enlightening regarding my issue. 我知道有冲突,但是我不知道如何解决它,网上的文章很少而且对我的问题没有启发。 Could someone suggest me a workaround, please? 有人可以建议我一种解决方法吗? Thanking you in advance Panos! 预先感谢您Panos!

Use the same version for both maps and location: 对地图和位置使用相同的版本:

  dependencies {
        compile fileTree(dir: 'libs', include: ['*.jar'])
        compile 'com.android.volley:volley:1.0.0'
        compile 'com.android.support:appcompat-v7:22.2.1'
        compile 'com.google.android.gms:play-services-maps:9.4.0'
        compile 'com.google.android.gms:play-services-location:9.4.0'
        compile 'com.google.maps.android:android-maps-utils:0.5'
  }

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 未知源文件:com.android.dex.DexException:多个dex文件定义了Lcom / google / android / gms / internal / zzpq; - Unknown source file : com.android.dex.DexException: Multiple dex files define Lcom/google/android/gms/internal/zzpq; 错误:将字节码转换为dex时出错:原因:com.android.dex.DexException:多个dex文件定义了Lcom / google / android / gms / common / api / zza; - Error:Error converting bytecode to dex: Cause: com.android.dex.DexException: Multiple dex files define Lcom/google/android/gms/common/api/zza; com.android.dex.DexException:多个dex文件定义了Lcom / facebook / internal / Utility $ GraphMeRequestWithCacheCallback; - com.android.dex.DexException: Multiple dex files define Lcom/facebook/internal/Utility$GraphMeRequestWithCacheCallback; 将字节码转换为dex时出错:原因:com.android.dex.DexException:多个dex文件定义了Lcom / RNFetchBlob / RNFetchBlobConst; - Error converting bytecode to dex: Cause: com.android.dex.DexException: Multiple dex files define Lcom/RNFetchBlob/RNFetchBlobConst; 将字节码转换为dex:原因:com.android.dex.DexException:定义了多个dex文件 - converting bytecode to dex: Cause: com.android.dex.DexException: Multiple dex files define 错误多个dex文件定义了Lcom / google / android / gms / location / places / zza; - ERROR Multiple dex files define Lcom/google/android/gms/location/places/zza; 错误:com.android.dex.DexException:多个dex文件定义了Ledu / umd / cs / findbugs / annotations / NonNull; - Error:com.android.dex.DexException: Multiple dex files define Ledu/umd/cs/findbugs/annotations/NonNull; com.android.dex.DexException:多个dex文件定义Lorg / hamcrest / Description; - com.android.dex.DexException: Multiple dex files define Lorg/hamcrest/Description; 意外的顶级异常:com.android.dex.DexException:多个dex文件定义 - UNEXPECTED TOP-LEVEL EXCEPTION: com.android.dex.DexException: Multiple dex files define 意外的顶级异常:com.android.dex.DexException:多个dex文件定义 - UNEXPECTED TOP-LEVEL EXCEPTION: com.android.dex.DexException: Multiple dex files define
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM