我在运行应用程序时遇到问题。突然,该应用开始产生此错误“重复类com.google.android.gms.location.places”。 而且我什至没有在开玩笑,我一直在搜索整个网站来解决此错误,甚至删除了所有项目并创建了一个新项目。但是没有,没有。什么都解决不了!
我相信我一直在阅读有关该主题的每个主题。 Ofc,那里有解决方案!碰巧对我来说不是正确的解决方案...
这是错误行:
Duplicate class com.google.android.gms.location.places.zza found in modules classes.jar (com.google.android.gms:play-services-places-placereport:16.0.0) and classes.jar (com.google.android.gms:play-services-places:9.6.1)
这是我的依赖项和app.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
maven {url 'https://jitpack.io'}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
app.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.example.qwisenow"
minSdkVersion 22
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.google.android.gms:play-services-maps:16.0.0'
implementation 'com.google.android.gms:play-services-location:16.0.0' // FusedLocationProviderClient
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.stripe:stripe-android:8.7.0'
implementation 'com.github.f0ris.sweetalert:library:1.5.6'
implementation 'com.ebanx:swipe-button:0.8.3'
implementation 'me.dm7.barcodescanner:zxing:1.9.13'
implementation 'com.braintreepayments:card-form:3.1.1'
implementation 'com.github.aarsy.googlemapsanimations:googlemapsanimations:1.0.5'
implementation 'com.android.support:cardview-v7:28'
implementation 'com.vipulasri:ticketview:1.0.7'
implementation 'me.philio:pinentryview:1.0.6'
implementation 'com.github.ar-android:DrawRouteMaps:1.0.0'
implementation 'com.codemybrainsout.onboarding:onboarder:1.0.4'
implementation 'com.karumi:dexter:5.0.0'
}
有人可以看到那里的东西看起来“重复”吗?我不能,我已经尝试了30种解决方案,但是Android Studio总是给我错误...