java.exe finished with non-zero exit value 2 when using Facebook SDK(java.exe 在使用 Facebook SDK 时以非零退出值 2 结束)
问题描述
当我尝试编译我的应用程序时,出现以下错误
When I try to compile my app I get a following error
Error:Execution failed for task ':app:dexDebug'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:Program FilesJavajdk1.7.0_60injava.exe'' finished with non-zero exit value 2
如果我摆脱 Facebook Android SDK,它可以毫无问题地编译.
If I get rid of Facebook Android SDK it compiles without a problem.
我的 build.gradle:
My build.gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 21 //tried 19 and 22 changing targetSdkVersion and buildToolsVersion accordingly
buildToolsVersion "21.1.2"
defaultConfig {
applicationId "..."
minSdkVersion 15
targetSdkVersion 21
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-project.txt'
}
}
...
}
dependencies {
...
compile 'com.facebook.android:facebook-android-sdk:3.23.1' //tried older versions as well
}
推荐答案
首先你应该尝试使用 gradle :MODULE:dependencies 列出你的依赖项检查是否存在库冲突(相同的库但版本不同).在这种情况下,我认为您应该从 Facebook SDK 中排除支持库模块.
First of all you should try to list your dependencies with gradle :MODULE:dependencies
Check if there are libraries conflicts ( same library but different version ). In this case i supose you should exclude support library module from Facebook SDK.
compile ('com.facebook.android:facebook-android-sdk:3.23.1'){
exclude group: 'com.google.android', module: 'support-v4'
}
这篇关于java.exe 在使用 Facebook SDK 时以非零退出值 2 结束的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:java.exe 在使用 Facebook SDK 时以非零退出值 2 结束
基础教程推荐
- 无法复制:“比较方法违反了它的一般约定!" 2022-01-01
- 修改 void 函数的输入参数,然后读取 2022-01-01
- 使用堆栈算法进行括号/括号匹配 2022-01-01
- RabbitMQ:消息保持“未确认"; 2022-01-01
- REST Web 服务返回 415 - 不支持的媒体类型 2022-01-01
- 问题http://apache.org/xml/features/xinclude测试日志4j 2 2022-01-01
- 如何对 Java Hashmap 中的值求和 2022-01-01
- Struts2 URL 无法访问 2022-01-01
- Spring AOP错误无法懒惰地为此建议构建thisJoinPoin 2022-09-13
- 存储 20 位数字的数据类型 2022-01-01
