Solution 1 :
Try to delete your build folder in app/build. And then try a clean build
Solution 2 :
Might be you have not enabled multidex,
Please go to app/build.gradle, if it is not enabled then enable it and restart the app again.
here is how you can do that:
Goto ->
/android/app/build.gradle and add
multidrxEnabled true
In defaultConfig
It should look like this:
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.example.chat_app_flutter_firebase"
minSdkVersion 16
targetSdkVersion 28
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
//Enable multidex by adding this line
multiDexEnabled true
}
Problem :
I was trying to add Firebase Crashlytics to my app and I followed this tutorial. When I ran the app, I am getting the following duplication runtime exception.
Execution failed for task ':app:mergeDebugResources'.
> [string/com.crashlytics.android.build_id] /home/chinkysight/Desktop/Pecha/build/app/generated/fabric/res/debug/values/com_crashlytics_build_id.xml [string/com.crashlytics.android.build_id] /home/chinkysight/Desktop/Pecha/build/app/generated/crashlytics/res/debug/values/com_crashlytics_build_id.xml: Error: Duplicate resources