title: Android Studio 2.0 Gradle Error [NoClassDefFoundError: Could not initialize class org.gradle.StartParameter]
body: <p>Not sure what's going on. I just updated Android Studio from version 1.5.1 to 2.0 on Ubuntu 15.10 about an hour ago.</p>
  
  <p>It seems as though Gradle can't be found or is having issues. It would make sense to find out the Gradle version and install the newest version, but it seems Android Studio grabs the Gradle version online and uses the dependency in the project level Gradle Build file to do so. Here is my gradle build file:</p>
  
  <pre><code>// Top-level build file where you can add configuration options common to all sub-projects/modules.
  
  
  buildscript {
      repositories {
          jcenter()
      }
      dependencies {
          classpath 'com.android.tools.build:gradle:2.1.0'
          classpath 'com.google.gms:google-services:2.1.0-alpha5'
  
          // NOTE: Do not place your application dependencies here; they belong
          // in the individual module build.gradle files
      }
  }
  
  allprojects {
      repositories {
          jcenter()
      }
  }
  
  task clean(type: Delete) {
      delete rootProject.buildDir
  }
  </code></pre>
  
  <p>I submitted a Bug report to Google. I honestly don't know why this would happen. </p>
  
  <p>I've tried "Invalidate Caches/Restart" - didn't help. </p>
  
  <p>I've tried the following versions of Gradle in this build file:</p>
  
  <pre><code>classpath 'com.android.tools.build:gradle:1.5.0'
  classpath 'com.android.tools.build:gradle:1.5.1'
  classpath 'com.android.tools.build:gradle:2.0.0'
  classpath 'com.android.tools.build:gradle:2.1.0'
  </code></pre>
  
  <p>None of these work. Same error for each. No idea why. Here's the error:</p>
  
  <pre><code>8:41:26 AM Gradle sync started
  8:41:26 AM Gradle sync failed: org.gradle.internal.SystemProperties.getInstance()Lorg/gradle/internal/SystemProperties;
             Consult IDE log for more details (Help | Show Log)
  8:42:32 AM NoClassDefFoundError: Could not initialize class org.gradle.StartParameter
  </code></pre>
  
  <ul>
  <li>8:41:26 AM - Happened on boot </li>
  <li>8:42:32 AM - Happens on "Clean Project" and "Rebuild Project"</li>
  </ul>
  
  <p>Thanks in advance.</p>
  
  <hr>
  
  <p>LOG OUTPUT:</p>
  
  <pre><code>2016-04-11 09:17:51,545 [  69021]   WARN - nal.AbstractExternalSystemTask - org.gradle.internal.SystemProperties.getInstance()Lorg/gradle/internal/SystemProperties; 
  java.lang.NoSuchMethodError: org.gradle.internal.SystemProperties.getInstance()Lorg/gradle/internal/SystemProperties;
      at org.gradle.initialization.BuildLayoutParameters.&lt;clinit&gt;(BuildLayoutParameters.java:28)
      at org.gradle.StartParameter.&lt;clinit&gt;(StartParameter.java:51)
      at org.jetbrains.plugins.gradle.service.GradleInstallationManager.getWrappedGradleHome(GradleInstallationManager.java:531)
      at org.jetbrains.plugins.gradle.service.GradleInstallationManager.getGradleHome(GradleInstallationManager.java:205)
      at org.jetbrains.plugins.gradle.service.GradleInstallationManager.doGetGradleHome(GradleInstallationManager.java:191)
      at org.jetbrains.plugins.gradle.service.GradleInstallationManager.getGradleHome(GradleInstallationManager.java:127)
      at org.jetbrains.plugins.gradle.GradleManager$4.fun(GradleManager.java:144)
      at org.jetbrains.plugins.gradle.GradleManager$4.fun(GradleManager.java:139)
      at com.intellij.openapi.externalSystem.util.ExternalSystemApiUtil.getExecutionSettings(ExternalSystemApiUtil.java:776)
      at com.intellij.openapi.externalSystem.service.ExternalSystemFacadeManager.doCreateFacade(ExternalSystemFacadeManager.java:202)
      at com.intellij.openapi.externalSystem.service.ExternalSystemFacadeManager.doGetFacade(ExternalSystemFacadeManager.java:178)
      at com.intellij.openapi.externalSystem.service.ExternalSystemFacadeManager.doInvoke(ExternalSystemFacadeManager.java:133)
      at com.intellij.openapi.externalSystem.service.ExternalSystemFacadeManager$MyHandler.invoke(ExternalSystemFacadeManager.java:270)
      at com.sun.proxy.$Proxy145.getResolver(Unknown Source)
      at com.intellij.openapi.externalSystem.service.internal.ExternalSystemResolveProjectTask.doExecute(ExternalSystemResolveProjectTask.java:48)
      at com.intellij.openapi.externalSystem.service.internal.AbstractExternalSystemTask.execute(AbstractExternalSystemTask.java:138)
      at com.intellij.openapi.externalSystem.service.internal.AbstractExternalSystemTask.execute(AbstractExternalSystemTask.java:124)
      at com.intellij.openapi.externalSystem.util.ExternalSystemUtil$3.execute(ExternalSystemUtil.java:419)
      at com.intellij.openapi.externalSystem.util.ExternalSystemUtil$4$2.run(ExternalSystemUtil.java:500)
      at com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:563)
      at com.intellij.openapi.progress.impl.CoreProgressManager$2.run(CoreProgressManager.java:142)
      at com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:446)
      at com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:392)
      at com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
      at com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:127)
      at com.intellij.openapi.progress.impl.ProgressManagerImpl$1.run(ProgressManagerImpl.java:126)
      at com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:366)
      at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      at java.util.concurrent.FutureTask.run(FutureTask.java:266)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      at java.lang.Thread.run(Thread.java:745)
      at org.jetbrains.ide.PooledThreadExecutor$1$1.run(PooledThreadExecutor.java:55)
  2016-04-11 09:17:51,549 [  69025]   INFO - radle.project.ProjectSetUpTask - org.gradle.internal.SystemProperties.getInstance()Lorg/gradle/internal/SystemProperties;
  </code></pre>
  
  <hr>
  
  <p><strong>UPDATE - FIXED</strong></p>
  
  <p>I deleted all android-studio files, project files (I have everything on Git) and re-installed.</p>
  
  <p>I was still having issues but it's only because I forgot to delete old gradle files as shown in this <a href="https://stackoverflow.com/a/28065338/3386826">answer here</a>.</p>
  
  <p><strong>DO NOT UPDATE TO 2.0 YET</strong></p>
  
  <p>This is too frustrating. Having problems with Virtual Devices now. "Cannot launch AVD in emulator". Don't be like me and install software the day it releases. Wait a few weeks!</p>