Suneet Agrawal
Suneet Agrawal

Reputation: 269

Android Project imported in android studio giving exception

I imported an eclipse project in android studio. On running the app, its giving the below error. As suggested in some links, I run the command 'gradlew.bat clear' and after that restarted my android studio, but it didn't worked.

Please help me out

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

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

Upvotes: 0

Views: 1262

Answers (3)

Clive Sargeant
Clive Sargeant

Reputation: 652

I changed the target version in my build.gradle file from targetSdkVersion 22 to targetSdkVersion 23 as i was using compileSdkVersion 23. The error went away and the app ran successfully after syncing ad rebuilding. hope this helps someone

Upvotes: 0

Prakhar Kulshreshtha
Prakhar Kulshreshtha

Reputation: 1065

changing java version to 1.7 and deleting concerning libs files helped me getting rid of the above exception.

Upvotes: -1

Igor Flysta
Igor Flysta

Reputation: 44

Look if you have duplicates in gradle settings like this:

compile 'com.google.android.gms:play-services:+'
compile files('libs/google-play-services.jar')

that could also cause this issue. Remove one of lines if you have this.

Upvotes: 2

Related Questions