I had followed steps of migrating to android studio 3.0 updgradation.
build.gradle
flavorDimensions \'dimensionless\'
Try to use the subprojects{} block in android/build.gradle and set the recent android compileSdkVersion and buildToolsVersion used in the main project so that the subprojects use these versions too.
Example
subprojects {
afterEvaluate {project ->
if (project.hasProperty("android")) {
android {
compileSdkVersion 27
buildToolsVersion "27.0.3"
}
}
} }