Facebook Login for Android Studio library import d

2019-07-31 01:44发布

问题:

I'm currently trying to import the facebook libraries on my project by following this steps from facebookdevelopers wherein they provided a step by step process on how to add the facebook library. Everything goes smoothly until I run my project and got the error:

Gradle: Execution failed for task ':Echo:dexDebug'.
> Running C:\Program Files (x86)\Android\android-studio\sdk\build-tools\android-4.2.2\dx.bat failed. See output

I'm sure that I followed the steps but I think something is not going out right on this part:

1. Create the file HelloWorldProject/libraries/facebook/build.gradle
2. Add the contents below:

as stated on the steps given since I'm getting other kind of error when I change this part (based on my opinion):

sourceSets {
    main {
        manifest.srcFile 'AndroidManifest.xml'
        java.srcDirs = ['src']
        resources.srcDirs = ['src']
        res.srcDirs = ['res']
    }
}

do anyone also expirienced this kind of problem? Hope you can help me fix this.