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不存在
![](https://img.haomeiwen.com/i2042197/12490967eb98f01d.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'
}
![](https://img.haomeiwen.com/i2042197/d40a55183a5ccec2.png)
flutter clean
flutter build apk
![](https://img.haomeiwen.com/i2042197/65bc6ceea0344cc4.png)
完成
网友评论