Android dependency ‘androidx.core:core’ has different version for the compile (1.0.0) and r...

栏目: Android · 发布时间: 6年前

内容简介:flutter中遇到这个问题,并且提示关于 AndroidX的问题。一般是因为使用了某些库,这些库要求使用AndroidX,但是我们的项目如何还使用了Android support相关的内容,那么这两个是不兼容的。可以按照下面的方式解决:在这个路径…/android/build.gradle (不是这个路径…/android/app/build.grade) 添加如下配置:

问题:

 Android dependency ‘androidx.core:core’ has different version for the compile (1.0.0) and runtime (1.0.1) classpath. You should manually set the same version via DependencyResolution 

flutter中遇到这个问题,并且提示关于 AndroidX的问题。

一般是因为使用了某些库,这些库要求使用AndroidX,但是我们的项目如何还使用了Android support相关的内容,那么这两个是不兼容的。可以按照下面的方式解决:

解决方法

在这个路径…/android/build.gradle (不是这个路径…/android/app/build.grade) 添加如下配置:

subprojects {
    project.configurations.all {
    resolutionStrategy.eachDependency { details ->
            if (details.requested.group == 'androidx.core' &&
           !details.requested.name.contains('androidx')) {
        details.useVersion "1.0.1"
            }
    }
    }    
}

如果还不能解决可以看看这里:

https://github.com/flutter/flutter/issues/27254

热度: 6


以上就是本文的全部内容,希望本文的内容对大家的学习或者工作能带来一定的帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Beginning PHP and MySQL 5

Beginning PHP and MySQL 5

W. Jason Gilmore / Apress / 2006-01-23 / USD 44.99

Beginning PHP and MySQL 5: From Novice to Professional, Second Edition offers comprehensive information about two of the most prominent open source technologies on the planet: the PHP scripting langua......一起来看看 《Beginning PHP and MySQL 5》 这本书的介绍吧!

JSON 在线解析
JSON 在线解析

在线 JSON 格式化工具

在线进制转换器
在线进制转换器

各进制数互转换器

URL 编码/解码
URL 编码/解码

URL 编码/解码