The Sync output says the following:
Possible causes for this unexpected error include:
Gradle’s dependency cache may be corrupt (this sometimes occurs after a network connection timeout.)
Solution: Re-download dependencies and sync project (requires network) - Tried, still does not work
The state of a Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons may solve this problem.
Solution: Stop Gradle build processes (requires restart) - Tried, still does not work
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. - Tried, still does not work
For the third point above, I am using the following third party plugins with which I was able to sync the gradle build files on gradle 3.3 (android gradle plugin 2.3.3):
compile 'com.jakewharton.timber:timber:4.7.1' compile 'org.greenrobot:eventbus:3.0.0' compile 'com.jakewharton:butterknife:10.1.0' annotationProcessor 'com.jakewharton:butterknife-compiler:10.1.0'
I have now upgraded to gradle 5.4.1 and android gradle plugin 3.4.1, and it fails to build. Could anyone please help me out of this?