After upgrading firebase crashlytics in my gradle files I got the following issue:
[string/com.crashlytics.android.build_id] /home/travis/build/NovySoft/novyNaplo/build/app/generated/fabric/res/release/values/com_crashlytics_build_id.xml
[string/com.crashlytics.android.build_id] /home/travis/build/NovySoft/novyNaplo/build/app/generated/crashlytics/res/release/values/com_crashlytics_build_id.xml: Resource and asset merger: Duplicate resources
Here is my travis CI build: https://travis-ci.com/github/NovySoft/novyNaplo/jobs/333164532
This is how my app-level build Gradle looks like:
...
apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'io.fabric'
apply plugin: 'com.google.firebase.firebase-perf'
apply from: "$flutterRoot/packages/flutter_tools/gradle/flutter.gradle"
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'
dependencies {
implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
testImplementation 'junit:junit:4.12'
androidTestImplementation 'androidx.test:runner:1.2.0'
androidTestImplementation 'androidx.test.espresso:espresso-core:3.2.0'
implementation 'com.google.firebase:firebase-analytics:17.4.1'
implementation 'com.google.firebase:firebase-messaging:20.1.7'
implementation 'com.google.firebase:firebase-crashlytics:17.0.0'
implementation 'com.google.firebase:firebase-perf:19.0.7'
implementation 'com.google.android.gms:play-services-ads:19.1.0'
}
...
And this is my project level one:
buildscript {
ext.kotlin_version = '1.2.71'
repositories {
google()
jcenter()
maven {
url 'https://maven.fabric.io/public'
}
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.5.3'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:1.3.50"
classpath 'com.google.gms:google-services:4.3.3'
classpath 'io.fabric.tools:gradle:1.31.2'
classpath 'com.google.firebase:perf-plugin:1.3.1'
classpath 'com.google.firebase:firebase-crashlytics-gradle:2.1.0'
}
}
Commenting out these lines resolves this error, but I'm concerned that this might create another error:
apply plugin: 'io.fabric'
classpath 'io.fabric.tools:gradle:1.31.2'
Do I really need to include io.fabric in my code or should I be fine without it? If I shouldn't remove io.fabric how could I resolve my original Duplicate resources error?