依赖'android.arch.lifecycle:runtime'对于Flutter中的类路径具有不同的版本 [英] dependency 'android.arch.lifecycle:runtime' has different version for classpath in Flutter

查看:206
本文介绍了依赖'android.arch.lifecycle:runtime'对于Flutter中的类路径具有不同的版本的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经通过执行以下两个命令来更新我的Flutter ios窗格

I have update my flutter ios pod by execute below two commands

cd iOS pod更新-详细 在此之后,我在android中出现以下错误

cd iOS pod update --verbose after this i am getting below error in android

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:preDebugBuild'.
> Android dependency 'android.arch.lifecycle:runtime' has different version             
for the compile (1.0.0) and runtime (1.1.0) classpath. You should manually set the same version via DependencyResolution

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 0s

我尝试将pubspec.yaml文件中的flutter版本默认更改为

I have tried change flutter version in pubspec.yaml file default to

version: 1.1.0+1   

推荐答案

我遇到了同样的问题,我解决了放置问题:

I was with the same problem, I solved putting:

subprojects {
    project.configurations.all {
        resolutionStrategy.eachDependency { details ->
            if (details.requested.group == 'com.android.support'
                    && !details.requested.name.contains('multidex') ) {
                details.useVersion "26.1.0"
            }
        }
    }
}

在android> build.gradle文件结尾

At the end of android > build.gradle file

我希望这对您有用.

这篇关于依赖'android.arch.lifecycle:runtime'对于Flutter中的类路径具有不同的版本的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆