【发布时间】:2019-02-25 18:46:53
【问题描述】:
我已将我的项目迁移到 AndroidX,因为我遇到了一些错误,但现在我收到一个错误循环,表明 androidX 类的版本与编译时不同:
Android dependency 'androidx.fragment:fragment' has different version for the compile (1.0.0-rc01) and runtime (1.1.0-alpha04) classpath. You should manually set the same version via DependencyResolution
而且它总是一个不同的类,我已经尝试过实现这段代码,但是每次我添加一行时,它都会给我其他与编译不同的类:
configurations.all {
resolutionStrategy {
force 'androidx.fragment:fragment:v4:1.1.0-alpha04'
}
}
【问题讨论】:
-
我刚刚在我的项目中遇到了同样的问题。通过
./gradlew app:dependencies检查依赖图来解决,看看哪些依赖对不同版本有相同的依赖。就我而言,它是 Google 服务和 Room。
标签: flutter