janishar / android-mvp-architecture

This repository contains a detailed sample app that implements MVP architecture using Dagger2, GreenDao, RxJava2, FastAndroidNetworking and PlaceholderView

Home Page:https://janisharali.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

deeps2 opened this issue · comments

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
  • Tried Clean build, Invalidate cache and restart but not working.

  • Similar Answers on Google/StackOverflow suggest downgrading the gradle version in distributionUrl to lower version but can't do it as minimum supported gradle version for latest android studio is 5.6.4

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.

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.