У меня была похожая проблема. Попробуйте это:
build.gradle
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.0'
classpath 'com.google.gms:google-services:4.2.0'
classpath 'com.google.firebase:firebase-plugins:1.1.5'
}
}
allprojects {
repositories {
google()
jcenter()
}
project.ext {
defaultBuildToolsVersion="28.0.3" //String
defaultMinSdkVersion=19 //Integer - Minimum requirement is Android 4.4
defaultTargetSdkVersion=28 //Integer - We ALWAYS target the latest by default
defaultCompileSdkVersion=28 //Integer - We ALWAYS compile with the latest by default
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
В ваш проект Gradle добавьте
buildscript {
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: 'io.fabric'
apply plugin: 'com.google.firebase.firebase-perf'
repositories {
maven { url 'https://maven.fabric.io/public' }
}
В ваших зависимостях
dependencies {
...
implementation 'com.googlecode.libphonenumber:libphonenumber:8.10.3'
implementation 'com.google.firebase:firebase-crash:16.2.1'
implementation('com.crashlytics.sdk.android:crashlytics:2.9.9') {
exclude group: 'com.google.protobuf', module: 'protobuf-lite'
exclude group: 'com.google.guava'
exclude group: 'io.grpc:grpc-protobuf-lite'
exclude group: 'com.google.protobuf.DescriptorProtos'
}
}
А внутри defaultConfig вы должны включить multiDex
android{
...
defaultConfig{
...
multiDexEnabled true
}
}