Pravinsingh Waghela
Pravinsingh Waghela

Reputation: 2534

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

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.

Upvotes: 1

Views: 14461

Answers (2)

reducing activity
reducing activity

Reputation: 2254

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

Upvotes: 1

karuhanga
karuhanga

Reputation: 3322

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.

Upvotes: 1

Related Questions