16
votes

After Android Studio update to 2.3, I'm getting the following error.

Console output message

Error:Unable to load class 'org.gradle.logging.StyledTextOutput'. 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.

Tried to fix

  • I've tried to invalidate cache and restart.
  • Use default gradle wrapper

Someone getting the same error?

3

3 Answers

52
votes

Try to check all your dependencies in build.gradle and update them if needed. In my case updating dexcount gradle plugin solved the problem.

2
votes

After update to Android Studio 2.3, the gradle path wasn't update.

Try to check your settings:

Try to check your settings

0
votes

None of these worked for me. Upgrading from android studio 3.3 to 3.4 solved the problem.