我已经更新了Flutter新版本2.5.2,我得到了这个错误。
*********************************************************
WARNING: This version of video_player will break your Android build if it or its dependencies aren't compatible with AndroidX.
See https://flutter.dev/docs/development/androidx-migration for more information on the problem and how to fix it.
This warning prints for all Android build failures. The real root cause of the error may be unrelated.
*********************************************************
FAILURE: Build failed with an exception.
* What went wrong:
Execution failed for task ':app:checkDebugAarMetadata'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.CheckAarMetadataWorkAction
> The minCompileSdk (31) specified in a
dependency's AAR metadata (META-INF/com/android/build/gradle/aar-metadata.properties)
is greater than this module's compileSdkVersion (android-30).
Dependency: androidx.work:work-runtime:2.7.0-rc01.
AAR metadata file: /Users/pratikbutani/.gradle/caches/transforms-2/files-2.1/7d175f0ad1054da40c6bd85adec2789b/work-runtime-2.7.0-rc01/META-INF/com/android/build/gradle/aar-metadata.properties.
* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
如果有人需要这方面的更多信息,请告诉我。任何帮助吗?build.gradle:
compileSdkVersion and targetSdkVersion to 30
and
configurations.all {
resolutionStrategy {
force 'androidx.core:core-ktx:1.6.0'
}
}