Today, before importing the Android Studio project, there was a very serious error, as follows:
Error: unable toLoadclass ' org.codehaus.groovy.runtime.typehandling.ShortTypeHandling '.Possible causes forThis unexpectedErrorInclude:<ul><li>gradle' s dependency cache May is corrupt (this sometimes occurs after a network connection timeout.)<a href="Syncproject">re-download dependencies andSync project (requires network) </a></li><li>the State ofA Gradle build process (daemon) may be corrupt. Stopping all Gradle daemons could solve this problem.<a href="Stopgradledaemons">StopGradle build processes (requires restart) </a></li></ul>inchThe Case ofCorrupt Gradle processes, you can alsoTryClosing the IDE and ThenKilling all Java processes.
Google searched for half a day and did not find the answer.
Analysis: Because gradle often updated, and often a variety of strange problems, so focus on the gradle problem, here http://stackoverflow.com/questions/28923716/ Getting-resolve-error-while-importing-project-in-android-studio-unable-to-load found the answer, my solution is as follows:
1, first the root directory of the Build.gradle file Classpath changed to:
‘com.android.tools.build:gradle:1.2.2‘
2. Locate the Gradle-wrapper.properties file, where Distributionurl is changed to:
distributionUrl=http\://services.gradle.org/distributions/gradle-2.2.1-all.zip
This will be OK ....
Android Studio unable to load class ' org.codehaus.groovy.runtime.typehandling.ShortTypeHandling '