DMT82
DMT82

Reputation: 881

Android Studio 0.6.1 & Facebook SDK 3.15.0 famous error. how solve?

I'm trying to import Facebook SDK 3.15.0 to Android Studio 0.6.1. I do follow Rani's explanation on using facebook sdk in android studio both for Android Studio earlier than 0.5.5 & the later one.

The error I get says something like this.

**Error:Execution failed for task ':app:processDebugResources'.

Error: A library uses the same package as this project: liquidcode.se.facebooktest You can temporarily disable this error with android.enforceUniquePackageName=false However, this is temporary and will be enforced in 1.0**

I also did include it in the setting.gradle & imported as module for the app.

I read now that many have the same problem, but how to fix it? Thank you.

Upvotes: 1

Views: 355

Answers (2)

Naj
Naj

Reputation: 853

Delete the ApplicationId from your facebook sdk library build.gradle file. It should end up looking something like this.

//Wrong

      defaultConfig {
        applicationId "com.bz.buktest"
        minSdkVersion 10
        targetSdkVersion 19
        versionCode 1
        versionName "1.0"
       }

//Right

     defaultConfig {
         minSdkVersion 10
         targetSdkVersion 19
         versionCode 1
         versionName "1.0"
}

Done. Your problem should be solved. Hope you got it.

Upvotes: 1

Blake G
Blake G

Reputation: 581

I would start over, and add the project via the File -> Project Structure dialog. Mine worked with minimal additional effort after adding the sdk via the Project Structure dialog.

After adding via the Project Structure dialog, you need to change buildToolsVersion in Facebook's build.gradle file.

Also delete the component named FacetManager in Facebooks .iml file.

If you follow those three steps you should have Facebook's sdk properly integrated into your project.

Upvotes: 0

Related Questions