So I had been searching forever for the solution to this and what my possible problem could be. I had narrowed down the source of the issue to the map_view plugin. It kept giving me errors with the dex file merge. I eventually found the following flutter issue report: https://github.com/flutter/flutter/issues/12945
In one of the comments it says to go into the ExternalLibraries>firebase_auth>android>build.gradle and change the dependencies from:
dependencies {
compile 'com.google.firebase:firebase-core:11.0.+'
compile 'com.google.firebase:firebase-auth:11.0.+'
compile 'com.google.firebase:firebase-database:11.0.+'
}
to:
dependencies {
compile 'com.google.firebase:firebase-core:11.+'
compile 'com.google.firebase:firebase-auth:11.+'
compile 'com.google.firebase:firebase-database:11.+'
}
and to do that for some other gradle files as well... This solution actually cause my app to break when I had map_view removed.
Later I discovered that the dependencies in map_view build.gradle file looked like the following:
dependencies {
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'org.jetbrains.kotlin:kotlin-stdlib-jre7:1.1.4-2'
compile 'com.google.android.gms:play-services-maps:11.+'
}
I changed it to:
dependencies {
compile 'com.android.support:appcompat-v7:25.3.1'
compile 'org.jetbrains.kotlin:kotlin-stdlib-jre7:1.1.4-2'
compile 'com.google.android.gms:play-services-maps:11.0.+'
}
Now it finally works.
Here is an image of the location of the dependency to change: Screenshot
I hope this helps someone. Also, if there is anyone that could explain why this fixed the issue, I would greatly appreciate it!
Thanks