I added facebook SDK via maven in the following way:
compile 'com.facebook.android:facebook-android-sdk:3.21.1'
When I compile, I am getting the error on my \app\src\main\res\values\colors.xml
file as
Error:Attribute "style" has already been defined
Any Suggestions? It is very puzzling.
Gradle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 21
buildToolsVersion '21.1.1'
defaultConfig {
applicationId 'com.rayat.pricewiz'
minSdkVersion 17
targetSdkVersion 21
versionCode 1
versionName '1.0'
}
buildTypes {
release {
runProguard false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
productFlavors {
}
}
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile files('libs/androidmvcframework.jar')
compile files('libs/ksoap2-android-assembly-2.5.8-jar-with-dependencies.jar')
compile files('libs/universal-image-loader-1.9.2.jar')
// You must install or update the Google Repository through the SDK manager to use this dependency.
// You must install or update the Google Repository through the SDK manager to use this dependency.
compile 'com.android.support:support-v4:21.0.0'
compile 'com.google.android.gms:play-services:6.1.71'
compile 'com.android.support:appcompat-v7:21.0.0'
compile 'com.android.support:recyclerview-v7:+'
compile files('libs/CWAC-SackOfViewsAdapter.jar')
compile 'com.daimajia.swipelayout:library:1.1.7@aar'
compile 'com.facebook.android:facebook-android-sdk:3.21.1'
}
My colors.xml file:
<?xml version="1.0" encoding="utf-8"?>
<resources>
<color name="white">#FFFFFF</color>
<color name="black">#000000</color>
<color name="red">#FF0000</color>
<color name="transparent">#00000000</color>
<color name="gray">#808080</color>
<color name="grey">#CDCDCD</color>
<color name="grey_dark">#5D5D5D</color>
<color name="blue_light">#69b5ec</color>
<color name="blue">#10a3d9</color>
<color name="blue_dark">#295496</color>
<color name="orange">#ed8305</color>
<color name="orange_light">#F7BB31</color>
<color name="logo_green">#46B525</color>
<color name="green_menu">#0F6A15</color>
<color name="orange_semi_transparent">#DC46B525</color>
<color name="actionbar_text">#FFFFFF</color>
<color name="black_overlay">#66000000</color>
<color name="grey_border">#DDDDDD</color>
<color name="navy_blue">#1A0DAB</color>
<color name="background_tab_pressed">#6633B5E5</color>
<color name="dark_grey">#808080</color>
<color name="btn_unselected_grey">#FAFAFA</color>
<color name="btn_unselected_grey_border">#EEEFF0</color>
<color name="follow_unselected">#5D5D5D</color>
<color name="bag_orange">#F7BB31</color>
<color name="hint_color">#66000000</color>
<color name="light_header_grey">#F1F1F1</color>
<color name="grey_header_text">#5A5A5A</color>
<color name="btn_pressed_color">#b3dae8</color>
<color name="fragment_seperator">#e5e5e5</color>
<color name="view_ontouch_color">#69B5EC</color>
</resources>
Thanks,
Noorul
The Facebook SDK has an attribute named "style" and in my case it seems to be conflicting with the same attribute name in JazzyViewPager
Open the intermediate file in the build directory and search for "name=style" to find out where the problem is originating
The gradle error will show you the command line with the intermediate file name
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With