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


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

查看所有标签

猜你喜欢:

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

Writing Apache Modules with Perl and C

Writing Apache Modules with Perl and C

Lincoln Stein、Doug MacEachern / O'Reilly Media, Inc. / 1999-03 / USD 39.95

Apache is the most popular Web server on the Internet because it is free, reliable, and extensible. The availability of the source code and the modular design of Apache makes it possible to extend Web......一起来看看 《Writing Apache Modules with Perl and C》 这本书的介绍吧!

RGB转16进制工具
RGB转16进制工具

RGB HEX 互转工具

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

各进制数互转换器

RGB HSV 转换
RGB HSV 转换

RGB HSV 互转工具