java.exe finished with non-zero exit value 2 when using Facebook SDK

后端 未结 2 750
我寻月下人不归
我寻月下人不归 2020-12-06 10:02

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:         


        
相关标签:
2条回答
  • 2020-12-06 10:13

    While using Facebook SDK project library, Pawel's solution worked for me.

    However it stopped working after I had migrated to Gradle dependency 'com.facebook.android:facebook-android-sdk:4.1.1'. Tried to rebuild/reopen project but nothing helped.

    This worked for me:

    compile ('com.facebook.android:facebook-android-sdk:4.1.1') {
        exclude module: 'support-v4'
    }
    
    0 讨论(0)
  • 2020-12-06 10:35

    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'
        }
    
    0 讨论(0)
提交回复
热议问题