ERROR: Unable to find method 'org.gradle.api.tasks.TaskInputs.file(Ljava/lang/Object;)Lorg/gradle/api/tasks/TaskInputs;
Recently purchased Android, this problem occurs when opening an old project for compilation.
solve the crime
One: Check the gradle plug-in version number of dependencies in build.gradle (not build.gradle under app).
Two: Download the corresponding Gradle package according to the gradle version number. Check the corresponding relationship between the gradle plug-in version number and the gradle version number.
Three : Download the corresponding Gradle version
Four: Set up in File | Settings | Build, Execution, Deployment | Gradle
Five: Recompile and it will be successful
You can also check out other solutions: https://www.freesion.com/article/66381191402/