在更新了flutter和一些包之后,我一直在获取
未能解决:androidx.legacy:legacy-support-v4:27.0.1错误
我已经将我的项目迁移到android x和gradle build 28,但是错误不会被清除。请帮忙。以下是我的一小段:
android {
compileSdkVersion 28
lintOptions {
disable 'InvalidPackage'
}
defaultConfig {
// TODO: Specify your own unique Application ID (https://developer.android.com/studio/build/application-id.html).
applicationId "com.mycompany"
minSdkVersion 16
targetSdkVersion 27
versionCode flutterVersionCode.toInteger()
versionName flutterVersionName
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
multiDexEnabled true
}
buildTypes {
release {
// TODO: Add your own signing config for the release build.
// Signing with the debug keys for now, so `flutter run --release` works.
signingConfig signingConfigs.debug
}
}
configurations.all {
resolutionStrategy {
force 'androidx.media:media:1.0.0'
}
}
}
flutter {
source '../..'
}
dependencies {
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.android.support:multidex:1.0.3'
implementation 'com.android.support:support-v4:28.0.0'
api 'androidx.legacy:legacy-support-v4:27.0.1'
}
apply plugin: 'com.google.gms.google-services'
最佳答案
试着用这个:androidx.legacy:legacy-support-v4:1.0.0
查看此处了解更多信息:https://developer.android.com/jetpack/androidx/migrate
关于android - Flutter Android Studio无法解决:androidx.legacy:legacy-support-v4:27.0.1错误,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/56615021/