0

On running an Android Application on Android Studio gives me the following error:-

Error:Execution failed for task ':app:dexDebug'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command '/usr/lib/jvm/java-8-oracle/bin/java'' finished with non-zero exit value 1

I have also added the multiDexEnabled true to my build.gradle file. But still it gives me the error.

I am not sure for what reason it shows me this error. I had also gone through the following links, But haven't got anything that could help me to solve my issue.

Process 'command usr/lib/jvm/java-8-oracle/bin/java' finished with non-zero exit value 2

Execution failed for task ':app:dexDebug'. com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException

Android with Gradle (Java finished with non-zero exit value 2)

Execution failed Process command /usr/lib/jvm/java-8-oracle/bin/java finished with non-zero exit value 2

Any help would save me my world. Thanks in advance.

Community
  • 1
  • 1
Pravinsingh Waghela
  • 2,226
  • 2
  • 25
  • 48

2 Answers2

1

This issue made me pull out lots of my hair. In my case, it turns out I had incompatible Firebase library versions.

I would suggest running through your dependencies once more for good measure, and make sure libraries that should be the same version are, libraries that depend on a particular version have that version, and you have not redefined dependencies that already transitively come from another dependency you have added.

Karuhanga
  • 1,781
  • 1
  • 18
  • 25
0

In my case going to File | Project structure... | Platform settings | SDKs and changing JDK home path to an alternative worked.

reducing activity
  • 1,645
  • 1
  • 24
  • 50