Flutter遇到版本冲突问题
Execution failed for task ':app:preDebugBuild'.
> Android dependency 'androidx.core:core' has different version for the compile (1.0.0) and runtime (1.0.2) classpath. You should manually set the same version via DependencyResolution

在终端输入:vi flutter_downloader-1.1.9/android/build.gradle
修改:dependencies {
implementation('androidx.work:work-runtime:2.0.0')
implementation 'androidx.annotation:annotation:1.0.0'
implementation 'androidx.core:core:1.0.0'
implementation 'androidx.localbroadcastmanager:localbroadcastmanager:1.0.0'
}
中的值为自己需要的

升级,flutter的时候最好也升级下第三库的版本号;不然也可能会有冲突;
https://pub.dev/flutter 可以查到版本号
网友评论