janishar / android-mvp-architecture

This repository contains a detailed sample app that implements MVP architecture using Dagger2, GreenDao, RxJava2, FastAndroidNetworking and PlaceholderView
https://janisharali.com
Apache License 2.0
4.44k stars 1.24k forks source link

Build Failure (Android Studio 3.6.2, Gradle: 5.6.4) (ERROR: Unable to find method 'org.gradle.api.tasks.TaskInputs.file) #91

Closed deeps2 closed 3 years ago

deeps2 commented 4 years ago

ISSUE: Build is failing on latest Android Studio

  1. Android Studio version: 3.6.2
  2. Gradle (from gradle-wrapper.properties): 5.6.4

Changes did

  1. project/build.gradle: classpath 'com.android.tools.build:gradle:3.6.2' (instead of 3.0.1)
  2. app/build.gradle: added buildToolsVersion '27.0.3'
  3. quality.gradle: changed destination("path") to destination file("path")
  4. gradle-wrapper.properties:distributionUrl=https\://services.gradle.org/distributions/gradle-5.6.4-all.zip

Error Message

ERROR: Unable to find method 'org.gradle.api.tasks.TaskInputs.file(Ljava/lang/Object;)Lorg/gradle/api/tasks/TaskInputs;'.
Possible causes for this unexpected error include:
Gradle's dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)
Re-download dependencies and sync project (requires network)

The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem.
Stop Gradle build processes (requires restart)

Your project may be using a third-party plugin which is not compatible with the other plugins in the project or the version of Gradle requested by the project.

In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.
deeps2 commented 3 years ago

Well, I couldn't find a solution to this particular issue after struggling for days. It seems to me that other users are not facing this exact issue as some users have open new issues(which is related to something else) after the creation of this issue in Apr2020.

So, today I just thought of deleting the whole repo and downloading it again. Surprisingly, it worked this time 👍 . I tried clean build, invalidate cache and restart earlier but that didn't work.

Closing this issue.