Flutter出现has different version f
2019-12-26 本文已影响0人
坤哥爱卿
导入barcode_scan调用系统扫描Api时会出现如下错误

解决办法
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