androidx.core:core’ has different version for the compile (1.0.0) and runtime (1.0.1) classpath
Flutter引入
photo: ^0.3.3
photo_manager: ^0.3.3
后出现上述问题
解决办法
1.android/gradle/wrapper/gradle-wrapper.properties里面
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.2-all.zip
2.android/build.gradle
dependencies { classpath 'com.android.tools.build:gradle:3.3.0' }
3.android/gradle.properties
加入
android.enableJetifier=true
android.useAndroidX=true
4.android/app/build.gradle 修改版本号:
make sure compileSdkVersion and targetSdkVersion are at least 28.
testInstrumentationRunner "androidx.test.runner.AndroidJUnitRunner"
5.android/app/build.gradle /defaultConfig加上
multiDexEnabled true