title: Android studio exisiting project throwing error on startup
body: <p>I have been working on a project lately.
  Yesterday my laptop shut down all of a sudden and I didn't bothered to start it again. </p>
  
  <p>Today when I started the project, I saw that after my gradle build, I have my MainActivity full of errors. Wonder what's wrong! When I try to debug and run the project it runs fine. Everything from import to all the System.out.println has error in it. </p>
  
  <p>When I try to print out something on EditText listner and then run the project. the project works fine.</p>
  
  <p>Additionally there was a file called maniac~2.jav that was auto-created with the same content as that of MainActivity.</p>
  
  <p>Need help in this
  Thanks in advance</p>
  
  <p>Here's the screenshot of the error
  <a href="https://i.stack.imgur.com/QEmMI.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/QEmMI.jpg" alt="enter image description here"></a></p>
  
  <p><strong>EDIT</strong>
  My gradle console messages on building the project </p>
  
  <pre><code>BUILD SUCCESSFUL
  
  Total time: 8.325 secs
  Executing tasks: [clean, :app:generateDebugSources, :app:generateDebugAndroidTestSources, :app:compileDebugSources, :app:compileDebugAndroidTestSources]
  
  Configuration on demand is an incubating feature.
  :clean UP-TO-DATE
  :app:clean
  :app:preBuild UP-TO-DATE
  :app:preDebugBuild UP-TO-DATE
  :app:checkDebugManifest
  :app:preReleaseBuild UP-TO-DATE
  :app:prepareComAndroidSupportAppcompatV72310Library
  :app:prepareComAndroidSupportSupportV42310Library
  :app:prepareDebugDependencies
  :app:compileDebugAidl
  :app:compileDebugRenderscript
  :app:generateDebugBuildConfig
  :app:generateDebugAssets UP-TO-DATE
  :app:mergeDebugAssets
  :app:generateDebugResValues UP-TO-DATE
  :app:generateDebugResources
  :app:mergeDebugResources
  :app:processDebugManifest
  :app:processDebugResources
  :app:generateDebugSources
  :app:preDebugAndroidTestBuild UP-TO-DATE
  :app:prepareDebugAndroidTestDependencies
  :app:compileDebugAndroidTestAidl
  :app:processDebugAndroidTestManifest
  :app:compileDebugAndroidTestRenderscript
  :app:generateDebugAndroidTestBuildConfig
  :app:generateDebugAndroidTestAssets UP-TO-DATE
  :app:mergeDebugAndroidTestAssets
  :app:generateDebugAndroidTestResValues UP-TO-DATE
  :app:generateDebugAndroidTestResources
  :app:mergeDebugAndroidTestResources
  :app:processDebugAndroidTestResources
  :app:generateDebugAndroidTestSources
  :app:processDebugJavaRes UP-TO-DATE
  :app:compileDebugJavaWithJavac
  :app:compileDebugNdk UP-TO-DATE
  :app:compileDebugSources
  :app:processDebugAndroidTestJavaRes UP-TO-DATE
  :app:compileDebugAndroidTestJavaWithJavac
  :app:compileDebugAndroidTestNdk UP-TO-DATE
  :app:compileDebugAndroidTestSources
  
  BUILD SUCCESSFUL
  
  Total time: 10.903 secs
  </code></pre>