我正在构建我的应用程序,当构建时发生此错误 -
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/