首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >Flutter未能解决:androidx.Legal:legacy v4:27.0.1错误

Flutter未能解决:androidx.Legal:legacy v4:27.0.1错误
EN

Stack Overflow用户
提问于 2019-06-15 23:49:35
回答 2查看 2.1K关注 0票数 2

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

未能解决:androidx.legacy.旧式:遗留-support-v4:27.0.1错误

我已经将我的项目迁移到了Android和gradle build 28,但是错误还不清楚。请帮帮忙。以下是我的app/build.gradle片段

代码语言:javascript
运行
复制
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'
EN

回答 2

Stack Overflow用户

发布于 2019-06-16 15:28:47

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

在这里寻找更多信息:https://developer.android.com/jetpack/androidx/migrate

票数 1
EN

Stack Overflow用户

发布于 2019-06-17 09:44:04

未能解决:androidx.legacy.旧式:遗留-support-v4:27.0.1错误

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

您可以检查官方医生遗产-一揽子支助的发行说明。

使用:

代码语言:javascript
运行
复制
api 'androidx.legacy:legacy-support-v4:1.0.0'

您还可以检查google回购。在这里,可获得的释放清单:

代码语言:javascript
运行
复制
1.0.0-alpha1
1.0.0-alpha3
1.0.0-beta01
1.0.0-rc01
1.0.0-rc02
1.0.0
票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/56615021

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档