Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

A problem was found with the configuration of task ':app:checkDebugManifest' (type 'CheckManifest') in flutter

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.

like image 790
Shreyansh Sharma Avatar asked Apr 29 '21 12:04

Shreyansh Sharma


2 Answers

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'
    }
}
like image 190
Dmitry Grushin Avatar answered Nov 20 '22 17:11

Dmitry Grushin


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

  1. gradle-wrapper.properties
  2. project build.gradle file

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
like image 8
Umesh Saraswat Avatar answered Nov 20 '22 17:11

Umesh Saraswat