Я создаю приложение, которое может автоматически определять ваше текущее местоположение, а также выбирать местоположение на карте, эти два процесса происходят в разных действиях. Но когда я пытаюсь установить его, возникает проблема дублирования в библиотеках, я исследовал inte rnet, но не могу найти решение.
Если есть другой способ реализовать средство выбора мест на карте для android studio Я хотел бы знать.
Ошибка, которая выдается в сборке, следующая:
Duplicate class com.google.android.gms.location.places.zza found in modules jetified-play-services-places-12.0.1-runtime.jar (com.google.android.gms:play-services-places:12.0.1) and play-services-places-placereport-17.0.0-runtime.jar (com.google.android.gms:play-services-places-placereport:17.0.0)
Duplicate class com.google.android.gms.measurement.AppMeasurement found in modules jetified-firebase-analytics-impl-12.0.1-runtime.jar (com.google.firebase:firebase-analytics-impl:12.0.1) and play-services-measurement-impl-17.2.0-runtime.jar (com.google.android.gms:play-services-measurement-impl:17.2.0)
Duplicate class com.google.android.gms.measurement.AppMeasurement$ConditionalUserProperty found in modules jetified-firebase-analytics-impl-12.0.1-runtime.jar (com.google.firebase:firebase-analytics-impl:12.0.1) and play-services-measurement-impl-17.2.0-runtime.jar (com.google.android.gms:play-services-measurement-impl:17.2.0)
Duplicate class com.google.android.gms.measurement.AppMeasurement$Event found in modules jetified-firebase-analytics-impl-12.0.1-runtime.jar (com.google.firebase:firebase-analytics-impl:12.0.1) and play-services-measurement-impl-17.2.0-runtime.jar (com.google.android.gms:play-services-measurement-impl:17.2.0)
Duplicate class com.google.android.gms.measurement.AppMeasurement$EventInterceptor found in modules jetified-firebase-analytics-impl-12.0.1-runtime.jar (com.google.firebase:firebase-analytics-impl:12.0.1) and play-services-measurement-impl-17.2.0-runtime.jar (com.google.android.gms:play-services-measurement-impl:17.2.0)
Duplicate class com.google.android.gms.measurement.AppMeasurement$OnEventListener found in modules jetified-firebase-analytics-impl-12.0.1-runtime.jar (com.google.firebase:firebase-analytics-impl:12.0.1) and play-services-measurement-impl-17.2.0-runtime.jar (com.google.android.gms:play-services-measurement-impl:17.2.0)
Duplicate class com.google.android.gms.measurement.AppMeasurement$Param found in modules jetified-firebase-analytics-impl-12.0.1-runtime.jar (com.google.firebase:firebase-analytics-impl:12.0.1) and play-services-measurement-impl-17.2.0-runtime.jar (com.google.android.gms:play-services-measurement-impl:17.2.0)
Duplicate class com.google.android.gms.measurement.AppMeasurement$UserProperty found in modules jetified-firebase-analytics-impl-12.0.1-runtime.jar (com.google.firebase:firebase-analytics-impl:12.0.1) and play-services-measurement-impl-17.2.0-runtime.jar (com.google.android.gms:play-services-measurement-impl:17.2.0)
Duplicate class com.google.firebase.analytics.FirebaseAnalytics found in modules jetified-firebase-analytics-impl-12.0.1-runtime.jar (com.google.firebase:firebase-analytics-impl:12.0.1) and play-services-measurement-api-17.2.0-runtime.jar (com.google.android.gms:play-services-measurement-api:17.2.0)
Duplicate class com.google.firebase.analytics.FirebaseAnalytics$Event found in modules jetified-firebase-analytics-impl-12.0.1-runtime.jar (com.google.firebase:firebase-analytics-impl:12.0.1) and play-services-measurement-api-17.2.0-runtime.jar (com.google.android.gms:play-services-measurement-api:17.2.0)
Duplicate class com.google.firebase.analytics.FirebaseAnalytics$Param found in modules jetified-firebase-analytics-impl-12.0.1-runtime.jar (com.google.firebase:firebase-analytics-impl:12.0.1) and play-services-measurement-api-17.2.0-runtime.jar (com.google.android.gms:play-services-measurement-api:17.2.0)
Duplicate class com.google.firebase.analytics.FirebaseAnalytics$UserProperty found in modules jetified-firebase-analytics-impl-12.0.1-runtime.jar (com.google.firebase:firebase-analytics-impl:12.0.1) and play-services-measurement-api-17.2.0-runtime.jar (com.google.android.gms:play-services-measurement-api:17.2.0)
Go в документации, чтобы узнать, как исправить зависимость ошибки разрешения.
Мое полное приложение: файл gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 29
buildToolsVersion "29.0.1"
defaultConfig {
applicationId "com.flowingmind.backtohome"
minSdkVersion 16
targetSdkVersion 29
versionCode 1
versionName "1.0"
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'androidx.appcompat:appcompat:1.1.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.lorentzos.swipecards:library:1.0.9'
implementation 'com.google.firebase:firebase-analytics:17.2.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'com.google.firebase:firebase-core:17.0.0'
implementation 'com.google.firebase:firebase-database:18.0.0'
implementation 'com.google.firebase:firebase-auth:18.0.0'
implementation 'com.google.firebase:firebase-storage:19.0.0'
implementation 'com.github.bumptech.glide:glide:3.7.0'
implementation 'androidx.appcompat:appcompat:1.0.2'
implementation 'androidx.preference:preference:1.1.0-alpha05'
implementation 'com.google.android.gms:play-services-maps:17.0.0'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test.ext:junit:1.1.1'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation 'androidx.cardview:cardview:1.0.0'
implementation 'androidx.recyclerview:recyclerview:1.1.0'
implementation 'com.facebook.android:facebook-android-sdk:[4,5)'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'com.google.android.gms:play-services-maps:17.0.0'
implementation 'com.google.android.gms:play-services-location:17.0.0'
implementation 'com.karumi:dexter:5.0.0'
implementation 'com.google.android.gms:play-services:12.0.1'
}
apply plugin: 'com.google.gms.google-services'