title: Execution Failed for task in android studio
body: <p>Does anyone faced this kind of error. I tried things from other posting but nothing worked.</p>
  
  <pre><code>Error:Execution failed for task ':app:compileBetaConfigDebugJavaWithJavac'.
  &gt; java.lang.ClassCastException: com.sun.tools.javac.code.Symbol$MethodSymbol cannot be cast to javax.lang.model.element.TypeElement
   ndency cache may be corrupt (this sometimes occurs after a network connection timeout.)
  &lt;a href="syncProject"&gt;Re-download dependencies and sync project (requires network)&lt;/a&gt;&lt;/li&gt;&lt;li&gt;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)&lt;/a&gt;&lt;/li&gt;
  &lt;li&gt;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.
  &lt;/li&gt;&lt;/ul&gt;In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.
  </code></pre>
  
  <p>Help me out. Thanks in advance.</p>
  
  <p>Note: this started happening after i adding retrofit to my project. I have Picasso library also from square sitting in my gradle dependency.</p>