[英]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.