Mic*_*ł K 20 java android gradle facebook-android-sdk android-gradle-plugin
当我尝试编译我的应用程序时,我收到以下错误
Error:Execution failed for task ':app:dexDebug'.
> com.android.ide.common.process.ProcessException: org.gradle.process.internal.ExecException: Process 'command 'C:\Program Files\Java\jdk1.7.0_60\bin\java.exe'' finished with non-zero exit value 2
Run Code Online (Sandbox Code Playgroud)
如果我摆脱Facebook Android SDK它编译没有问题.
我的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
}
Run Code Online (Sandbox Code Playgroud)
小智 18
首先,您应该尝试列出您的依赖项,gradle :MODULE:dependencies
检查是否存在库冲突(相同的库但版本不同).在这种情况下,我想你应该从Facebook SDK中排除支持库模块.
compile ('com.facebook.android:facebook-android-sdk:3.23.1'){
exclude group: 'com.google.android', module: 'support-v4'
}
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
35008 次 |
| 最近记录: |