Android Studio错误:'命令'C:\ Program Files \ Java \ jdk1.7.0_75 \ bin \ java.exe''完成,返回值非零
在尝试运行应用程序时添加libriaes项目后出现此错误.
I am getting this error after adding a libriaes project while try to run the application.
Android Studio version : 1.2.1.1
错误:任务':app:dexDebug'的执行失败.
Error:Execution failed for task ':app:dexDebug'.
com.android.ide.common.process.ProcessException:org.gradle.process.internal.ExecException:Process'命令 C:\ Program Files \ Java \ jdk1.7.0_75 \ bin \ java.exe完成 非零退出值2
com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.7.0_75\bin\java.exe'' finished with non-zero exit value 2
当我有重复的库时,出现此错误.例如,如果某些模块使用与要添加到项目中的库相同的库,则可能会发生此错误.尝试查找您的应用程序中是否有重复项.
I've got this error when I had duplicates of libraries. For example if some module uses the same library that you are adding to the project this error might occur. Try to find if there are any duplicates in your app.
编辑
是的,我的模块中间接有两个相同的库.
在我的主项目中,我正在使用android.support.v4.app
jar和一个android库项目,该库项目还包含主项目中已经存在的同一jar android.support.v4.app
文件,因此我只是从主项目中删除了android.support.v4.app
,终于,这个解决方案可以正常工作了.
Yes correct , I have two same library in my module indirectly.
In my main project I am using android.support.v4.app
jar and a android library project, this library project also containing same jar android.support.v4.app
file which was already have in my main project, so simply I was deleted android.support.v4.app
from my main project, finally this solution will working fine.