Actually the main error is \"java.exe finished with non-zero exit value 1\". First i tell you every problem which i faced after installing studio:
Three day
In gradle plugin version 2.0.0-alpha7 and -alpha8 Dex runs inside gradle build process as opposed to a separate process.
Change gradle plugin version to 2.0.0-alpha9 where in-process Dex is disabled by default.
classpath 'com.android.tools.build:gradle:2.0.0-alpha9'
Disable in-process dex in your app module build.gradle:
android {
// ...
dexOptions {
dexInProcess = false
}
}
Increase memory available to gradle process.
Create or update gradle.properties file in your project root directory:
# Default value: -Xmx10248m -XX:MaxPermSize=256m
org.gradle.jvmargs=-Xmx4g -XX:MaxPermSize=512m
And update your app module build.gradle file:
dexOptions {
preDexLibraries true
javaMaxHeapSize "3g"
incremental true
dexInProcess = true
}
These values are experimental and work for my setup. I use 3 GB for dex and 4 GB for gradle (3 + 1 GB).
If you have any issues update to alpha9 anyway.