android - 发现flutter中任务 ':app:checkDebugManifest'(类型 'CheckManifest')的配置有问题

标签 android ios flutter dart

我正在构建我的应用程序,当构建时发生此错误 -

FAILURE: Build failed with an exception.

* What went wrong:
A problem was found with the configuration of task ':app:checkDebugManifest' (type 'CheckManifest').
  - Type 'CheckManifest' property 'manifest' has @Input annotation used on property of type 'File'.

    Reason: A property of type 'File' annotated with @Input cannot determine how to interpret the file.

    Possible solutions:
      1. Annotate with @InputFile for regular files.
      2. Annotate with @InputDirectory for directories.
      3. If you want to track the path, return File.absolutePath as a String and keep @Input.

    Please refer to https://docs.gradle.org/7.0/userguide/validation_problems.html#incorrect_use_of_input_annotation for more details about this problem.

* 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.

* Get more help at https://help.gradle.org

BUILD FAILED in 1m 0s
我不知道为什么会发生此错误,而之前一切正常。请有人帮我解决这个问题。

最佳答案

在我的情况下,我在将 Gradle 升级到版本 7 后遇到了这样的错误。
我通过在项目 build.gradle 文件中更新版本“com.android.tools.build:gradle”来修复它:

buildscript {

    repositories {
        jcenter()
        maven {
            url 'https://maven.google.com/'
            name 'Google'
        }
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:4.2.0'
    }
}

关于android - 发现flutter中任务 ':app:checkDebugManifest'(类型 'CheckManifest')的配置有问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/67317350/

相关文章:

java - 空对象引用上的 NullPointerException : Connection. createStatement()

java - 如何将 textview 设置为共享首选项值

Android OutOfMemory 异常 - 是否有另一种方法可以满足我的需求?

java - JsonHttpRH : onSuccess(int, Header[], JSONArray) 未被覆盖,但收到回调?

ios - 标签没有固定在表格 View 单元格的右侧

ios - 导航栏颜色困惑

ios - 使用 UIKit 制作一个简单的绘图应用程序

file - Flutter 使用 http 包监控文件上传进度

flutter - Flutter:如何使按钮并排而不是一个在另一个下方?

ios - 如何删除通知角标(Badge)-Flutter