美文网首页
适配AndroidX时build apk提示错误

适配AndroidX时build apk提示错误

作者: 晓函 | 来源:发表于2020-05-05 10:33 被阅读0次

flutter build apk提示2个错误

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

androidx.lifecycle不存在

image.png

解决办法:
修改android/build.gradle
将com.android.tools.build:gradle从3.2.1修改为最新版本3.3.2

dependencies {
    classpath 'com.android.tools.build:gradle:3.3.2'
}
image.png
flutter clean
flutter build apk
image.png

完成

相关文章

网友评论

      本文标题:适配AndroidX时build apk提示错误

      本文链接:https://www.haomeiwen.com/subject/ylueghtx.html