Android dependency 'com.android.support:support-v4' has different version

Add the following to the Android Project level build.gradle file's 'subprojects' section (as also mentioned in the link provided by Günter Zöchbauer in the comment):

   subprojects {

    project.evaluationDependsOn(':app')
//[PART TO ADD START]
    project.configurations.all {

        resolutionStrategy.eachDependency { details ->

            if (details.requested.group == 'com.android.support'
                    && !details.requested.name.contains('multidex') ) {
                details.useVersion "27.1.0"
            }
        }
    }
//[PART TO ADD END]
    }