我在此Forum中尝试了上述所有建议,但仍然收到此错误。
错误:程序类型已存在: com.google.android.gms.measurement.internal.zzbn
Android Studio 3.2.1 Build#AI-181.5540.7.32.5056338,建于2018年10月9日 JRE:1.8.0_152-release-1136-b06 x86_64 JVM:JetBrains s.r.o macOS 10.14开发的OpenJDK 64位服务器VM
Project Gradle->
buildscript {
repositories {
google() // here
jcenter()
maven {
url 'https://maven.fabric.io/public'
}
}
dependencies {
classpath 'com.google.gms:google-services:4.2.0' // google-services plugin
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'io.fabric.tools:gradle:1.26.1'
classpath 'com.google.firebase:firebase-plugins:1.1.5'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
maven {
url 'https://maven.google.com/'
}
maven { url 'https://jitpack.io' }
}
}
App Gradle->
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
apply plugin: 'com.google.firebase.firebase-perf'
// Firebase
implementation "com.google.firebase:firebase-core:16.0.4" // Analytics
implementation "com.google.firebase:firebase-firestore:17.1.3" // Cloud Firestore
implementation "com.google.firebase:firebase-auth:16.0.5" // Authentication
implementation "com.google.firebase:firebase-messaging:17.3.4" // Cloud Messaging / Notifications
implementation "com.google.firebase:firebase-config:16.1.0" // Remote Config
implementation "com.google.firebase:firebase-dynamic-links:16.1.3" // Invites / Dynamic Links
implementation "com.google.firebase:firebase-ads:17.1.0" // AdMob
implementation "com.google.firebase:firebase-perf:16.2.0" // Perf
implementation "com.google.firebase:firebase-functions:16.1.3" // Cloud Function
// Location
implementation "com.google.android.gms:play-services-location:16.0.0"
gradle-wrapper.properties->
distributionUrl = https://services.gradle.org/distributions/gradle-4.6-all.zip