Android Stduio takes place Process ' command ' SomePath:java.exe ' finished with Non-zero exit value 2 Exception workaround

Source: Internet
Author: User

Sometimes you will notice that when you compile with Android Studio, you are prompted:

Error:execution failed for task ':d Emo:dexdebug '.
> com.android.ide.common.process.ProcessException:org.gradle.process.internal.ExecException:Process ' command ' Java.exe ' finished with Non-zero exit value 2

Why is that? You are a reboot Ah Androidstudio, restart the computer is not.

So think about it, what's the operation before? Is there a new lib or something like a reference library to join?

This time can not only see the last exception, but also to look up, I found the result is the package name conflict, there are duplicate jar package name. The package name here does not refer to the same name as the jar, but to the same package name in the jar package. Conflicts can be ruled out.

===============================================================

Another solution offered on the web, but I find it useless for me to be an anomaly.

----------Xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx---------------------------

In fact, directly open the Gradle project, the corresponding project script file, changed to the following on the line

dependencies {    Compile project (':d emo ')    provided filetree (include: [' *.jar '], dir: ' Libs ')    Compile ' com.android.support:support-v4:22.1.1 '    compile ' com.android.support:appcompat-v7:22.1.1 '}

The criteria for the library to be referenced will be changed to provided, not compile. Because they are already libraries, and then compile ...

Reference Url:https://github.com/frankiesardo/icepick/blob/master/readme.md#download

Android Stduio takes place Process ' command ' SomePath:java.exe ' finished with Non-zero exit value 2 Exception workaround

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.