I was building my app, when this error occured while building -
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
I have no idea why this error occured, while everything was working fine just before. Please someone help me with this.
In my case I got such error after upgrading Gradle to version 7.
I fixed it by updating a version 'com.android.tools.build:gradle' in project build.gradle file:
buildscript {
repositories {
jcenter()
maven {
url 'https://maven.google.com/'
name 'Google'
}
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:4.2.0'
}
}
I have upgrade the android studio to 4.X.X that time android studio automatically upgraded all my gradle files.
You need to check two files
In gradle-wrapper.properties need to use
distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip
and in project build.gradle file
classpath 'com.android.tools.build:gradle:4.2.2
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With