简体   繁体   中英

Android Studio 2.3 gradle error

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?

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

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

Try to check your settings:

尝试检查您的设置

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

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM