1

My problem is this: I just installed Google Android Studio and when i run the default program (the simple interface and that default java code) it gives me this error

Error:Execution failed for task ':app:dexDebug'.

com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files (x86)\Java\jdk1.7.0_60\bin\java.exe'' finished with non-zero exit value 1

i am really new with android and i don't know what to do? please help...

Mohammad
  • 17
  • 3
  • What "default" program were you using? It's not clear from your explanation. – nameless912 Jul 31 '15 at 16:22
  • possible duplicate of [Execution failed for task ':app:dexDebug'. com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException](http://stackoverflow.com/questions/29460443/execution-failed-for-task-appdexdebug-com-android-ide-common-process-proces) – nameless912 Jul 31 '15 at 16:23
  • i mean the code that the google android studio has itself – Mohammad Jul 31 '15 at 17:32

4 Answers4

0

Had a similar problem solved it by adding two lines to the top of the build.gradle files:

sourceCompatibility=JavaVersion.VERSION_1_7 targetCompatibility=JavaVersion.VERSION_1_7

If you're using the experimental gradle plugin do this:

apply plugin: 'com.android.model.application'
sourceCompatibility=JavaVersion.VERSION_1_7
targetCompatibility=JavaVersion.VERSION_1_7

model {
    android {
        ...

Otherwise it's something like this:

android {
    compileSdkVersion 22
    buildToolsVersion "23.0.0 rc3"
    ...
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_7
        targetCompatibility JavaVersion.VERSION_1_7
    }
    ...

*Make sure to go through all the build.gradle files and add the JavaVersion to any that have "model" or "android" in them

ikor
  • 58
  • 5
  • Issue is completely fixed by upgrading to the latest build of android studio and using **com.android.tools.build:gradle-experimental:0.2.0** – ikor Aug 03 '15 at 17:53
0

I had this problem too, but fixed it. I assumed that everything was due to the Estimote library which I updated to a new version that comes in AAR format only.

Turns out, I had other dependencies being responsible for this. These did not cause any problems with the previous version that was a JAR.

In my case, I've included parse-bolts twice. Everything works great since I removed one of the lines in my build.gradle

Alex
  • 1,395
  • 1
  • 13
  • 22
0

It happens to me as well just after updating the Android studio.

I solved it by

  1. "Build" --> "Clean Project"
  2. "Build" --> "Rebuild Project"

Good luck.

Diiiiii
  • 209
  • 3
  • 8
0

Check that you don't add this library twice.

Unheilig
  • 16,196
  • 193
  • 68
  • 98