Flatter Android Studio未能解决以下问题:androidx.legacy:legacy-support-v4:27.0.1错误

Flatter Android Studio未能解决以下问题:androidx.legacy:legacy-support-v4:27.0.1错误,android,flutter,android-gradle-plugin,build.gradle,androidx,Android,Flutter,Android Gradle Plugin,Build.gradle,Androidx,在更新了颤振和一些软件包之后,我一直得到 未能解析:androidx。旧版:旧版-support-v4:27.0.1错误 我已经将我的项目迁移到Android X和gradle build 28,但错误不会清除。请帮忙。下面是我的app/build.gradle的一个片段: android { compileSdkVersion 28 lintOptions { disable 'InvalidPackage' } defaultConfig

在更新了颤振和一些软件包之后,我一直得到

未能解析:androidx。旧版:旧版-support-v4:27.0.1错误

我已经将我的项目迁移到Android X和gradle build 28,但错误不会清除。请帮忙。下面是我的
app/build.gradle
的一个片段:

android {
    compileSdkVersion 28

    lintOptions {
        disable 'InvalidPackage'
    }

    defaultConfig {
        // TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
        applicationId "com.mycompany"
        minSdkVersion 16
        targetSdkVersion 27
        versionCode flutterVersionCode.toInteger()
        versionName flutterVersionName
        testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
        multiDexEnabled true
    }

    buildTypes {
        release {
            // TODO: Add your own signing config for the release build.
            // Signing with the debug keys for now, so `flutter run --release` works.
            signingConfig signingConfigs.debug
        }
    }

    configurations.all {
        resolutionStrategy {
            force 'androidx.media:media:1.0.0'
        }
    }
}

flutter {
    source '../..'
}

dependencies {
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
    implementation 'com.android.support:multidex:1.0.3'
    implementation 'com.android.support:support-v4:28.0.0'
    api 'androidx.legacy:legacy-support-v4:27.0.1'

}

apply plugin: 'com.google.gms.google-services'

试着使用这个:
androidx.legacy:legacy-support-v4:1.0.0

请查看此处了解更多信息:

未能解析:androidx。旧版:旧版-support-v4:27.0.1错误

之所以发生这种情况,是因为androidx.legacy:legacy-support-v4:27.0.1不存在

您可以查看的和的发行说明

使用:

api 'androidx.legacy:legacy-support-v4:1.0.0'
您也可以查看。以下是可用版本的列表:

1.0.0-alpha1
1.0.0-alpha3
1.0.0-beta01
1.0.0-rc01
1.0.0-rc02
1.0.0