title: gradle sync failed caused: java.lang.NullPointerException
body: <p>Today i stared my Android Studio and this error pop up, yesterday everything was fine...
  really don't know what could go wrong, so i tried reinstall android studio, Android SDK build tools are installed, android SDK tools 25.2.2 also</p>
  
  <p>help</p>
  
  <p>from module app</p>
  
  <pre><code>apply plugin: 'com.android.application'
  
  
  android {
      compileSdkVersion 23
      buildToolsVersion "21.1.2"
  
      defaultConfig {
          applicationId "oo"
          minSdkVersion 17
          targetSdkVersion 23
          versionCode 1
          versionName "1.0"
          testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
      }
      buildTypes {
          release {
              minifyEnabled false
              proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
          }
      }
  }
  dependencies {
      compile fileTree(dir: 'libs', include: ['*.jar'])
      compile 'com.android.support:appcompat-v7:23.0.1'
      compile 'com.android.support:design:23.0.1'
  }
  </code></pre>
  
  <p>from project</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.2.2'
  
          // 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>EVENT LOG after starting android studio</p>
  
  <pre><code>&gt; Error:Cause: java.lang.NullPointerException   at
  &gt; java.util.Objects.requireNonNull(Objects.java:203)    at
  &gt; java.util.Arrays$ArrayList.&lt;init&gt;(Arrays.java:3813)   at
  &gt; java.util.Arrays.asList(Arrays.java:3800)     at
  &gt; com.intellij.openapi.util.io.FileUtilRt.doCreateTempFile(FileUtilRt.java:399)
  &gt;   at
  &gt; com.intellij.openapi.util.io.FileUtilRt.createTempFile(FileUtilRt.java:361)
  &gt;   at
  &gt; com.intellij.openapi.util.io.FileUtilRt.createTempFile(FileUtilRt.java:341)
  &gt;   at
  &gt; com.intellij.openapi.util.io.FileUtilRt.createTempFile(FileUtilRt.java:334)
  &gt;   at
  &gt; com.intellij.openapi.util.io.FileUtil.createTempFile(FileUtil.java:1479)
  &gt;   at
  &gt; com.android.tools.idea.gradle.util.GradleUtil.addInitScriptCommandLineOption(GradleUtil.java:1064)
  &gt;   at
  &gt; com.android.tools.idea.gradle.util.GradleUtil.addLocalMavenRepoInitScriptCommandLineOption(GradleUtil.java:1057)
  &gt;   at
  &gt; com.android.tools.idea.gradle.util.GradleUtil.addLocalMavenRepoInitScriptCommandLineOption(GradleUtil.java:1023)
  &gt;   at
  &gt; com.android.tools.idea.gradle.project.AndroidGradleProjectResolver.getExtraCommandLineArgs(AndroidGradleProjectResolver.java:345)
  &gt;   at
  &gt; org.jetbrains.plugins.gradle.service.project.GradleProjectResolver.doResolveProjectInfo(GradleProjectResolver.java:175)
  &gt;   at
  &gt; org.jetbrains.plugins.gradle.service.project.GradleProjectResolver.access$300(GradleProjectResolver.java:73)
  &gt;   at
  &gt; org.jetbrains.plugins.gradle.service.project.GradleProjectResolver$ProjectConnectionDataNodeFunction.fun(GradleProjectResolver.java:768)
  &gt;   at
  &gt; org.jetbrains.plugins.gradle.service.project.GradleProjectResolver$ProjectConnectionDataNodeFunction.fun(GradleProjectResolver.java:752)
  &gt;   at
  &gt; org.jetbrains.plugins.gradle.service.execution.GradleExecutionHelper.execute(GradleExecutionHelper.java:238)
  &gt;   at
  &gt; org.jetbrains.plugins.gradle.service.project.GradleProjectResolver.resolveProjectInfo(GradleProjectResolver.java:112)
  &gt;   at
  &gt; org.jetbrains.plugins.gradle.service.project.GradleProjectResolver.resolveProjectInfo(GradleProjectResolver.java:73)
  &gt;   at
  &gt; com.intellij.openapi.externalSystem.service.remote.RemoteExternalSystemProjectResolverImpl$1.produce(RemoteExternalSystemProjectResolverImpl.java:41)
  &gt;   at
  &gt; com.intellij.openapi.externalSystem.service.remote.RemoteExternalSystemProjectResolverImpl$1.produce(RemoteExternalSystemProjectResolverImpl.java:37)
  &gt;   at
  &gt; com.intellij.openapi.externalSystem.service.remote.AbstractRemoteExternalSystemService.execute(AbstractRemoteExternalSystemService.java:59)
  &gt;   at
  &gt; com.intellij.openapi.externalSystem.service.remote.RemoteExternalSystemProjectResolverImpl.resolveProjectInfo(RemoteExternalSystemProjectResolverImpl.java:37)
  &gt;   at
  &gt; com.intellij.openapi.externalSystem.service.remote.wrapper.ExternalSystemProjectResolverWrapper.resolveProjectInfo(ExternalSystemProjectResolverWrapper.java:49)
  &gt;   at
  &gt; com.intellij.openapi.externalSystem.service.internal.ExternalSystemResolveProjectTask.doExecute(ExternalSystemResolveProjectTask.java:51)
  &gt;   at
  &gt; com.intellij.openapi.externalSystem.service.internal.AbstractExternalSystemTask.execute(AbstractExternalSystemTask.java:138)
  &gt;   at
  &gt; com.intellij.openapi.externalSystem.service.internal.AbstractExternalSystemTask.execute(AbstractExternalSystemTask.java:124)
  &gt;   at
  &gt; com.intellij.openapi.externalSystem.util.ExternalSystemUtil$3.execute(ExternalSystemUtil.java:419)
  &gt;   at
  &gt; com.intellij.openapi.externalSystem.util.ExternalSystemUtil$4$2.run(ExternalSystemUtil.java:500)
  &gt;   at
  &gt; com.intellij.openapi.progress.impl.CoreProgressManager$TaskRunnable.run(CoreProgressManager.java:563)
  &gt;   at
  &gt; com.intellij.openapi.progress.impl.CoreProgressManager$2.run(CoreProgressManager.java:142)
  &gt;   at
  &gt; com.intellij.openapi.progress.impl.CoreProgressManager.registerIndicatorAndRun(CoreProgressManager.java:446)
  &gt;   at
  &gt; com.intellij.openapi.progress.impl.CoreProgressManager.executeProcessUnderProgress(CoreProgressManager.java:392)
  &gt;   at
  &gt; com.intellij.openapi.progress.impl.ProgressManagerImpl.executeProcessUnderProgress(ProgressManagerImpl.java:54)
  &gt;   at
  &gt; com.intellij.openapi.progress.impl.CoreProgressManager.runProcess(CoreProgressManager.java:127)
  &gt;   at
  &gt; com.intellij.openapi.progress.impl.ProgressManagerImpl$1.run(ProgressManagerImpl.java:126)
  &gt;   at
  &gt; com.intellij.openapi.application.impl.ApplicationImpl$8.run(ApplicationImpl.java:369)
  &gt;   at
  &gt; java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
  &gt;   at java.util.concurrent.FutureTask.run(FutureTask.java:266)     at
  &gt; java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
  &gt;   at
  &gt; java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
  &gt;   at java.lang.Thread.run(Thread.java:745)
  </code></pre>