【问题标题】:Flutter 2.5.2 giving error compile time app:checkDebugAarMetadataFlutter 2.5.2 给出错误编译时应用程序:checkDebugAarMetadata
【发布时间】:2021-12-01 01:03:36
【问题描述】:

我已经更新了 Flutter New Version 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.

如果有人需要更多信息,请告诉我。有什么帮助吗?

【问题讨论】:

    标签: flutter compiler-errors flutter-video-player flutter2.0


    【解决方案1】:
    build.gradle:
    compileSdkVersion and targetSdkVersion to 30
    
    and
    
    configurations.all {
    resolutionStrategy {
    force 'androidx.core:core-ktx:1.6.0'
    }
    }  
    

    【讨论】:

    • 你能分享更多关于在 build.grade 文件中放置配置节点的信息吗?到根?
    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2016-02-27
    • 2012-01-31
    • 1970-01-01
    • 2011-05-10
    • 2017-12-07
    相关资源
    最近更新 更多