navasmdc / MaterialDesignLibrary

This is a library with components of Android L to you use in android 2.2
Apache License 2.0
8.99k stars 2.23k forks source link

Cannot use with android support design library #317

Open ngvietan92 opened 9 years ago

ngvietan92 commented 9 years ago

When I try used this library with android support design library, an error is appeared "Error:(1) Attribute "rippleColor" has already been defined" This is dependencies in my build.gradle file dependencies { ... compile 'com.android.support:design:22.2.1' compile 'com.github.navasmdc:MaterialDesign:1.5@aar' ... }

Please help me

vishnuchd commented 9 years ago

i also faced the same problem.

susheel17 commented 9 years ago

Same problem...

never615 commented 9 years ago

you hava compile 'com.android.support:design:22.2.1' ?

rorlig commented 9 years ago

does not work with 22.2.1 either

kamilwlf commented 9 years ago

same

stephenotalora commented 9 years ago

what error do you folks get? can y'all open Gradle > build > (hit) build. and post the error that you get here?

Perhaps there's a library clash between the two and you may need to explicitly tell Gradle to exclude modules between the two.

rorlig commented 9 years ago

"Error:(1) Attribute "rippleColor" has already been defined"

I resolved it by importing the library directly into my project and changing the attribute name. I believe that is the quickest fix

stephenotalora commented 9 years ago

@rorlig how did you import the library? just Forked the repo and did you clone it into your project directory? then compile project in Gradle? do you have an example?

stephenotalora commented 9 years ago

@rorlig

dependencies {
compile(':MaterialDesingLibrary:') 
}
rorlig commented 9 years ago

yes i clones the repo and included the library in my project and then include in build.gradle as you mentioned.. dependencies { compile(':MaterialDesingLibrary:') }

stephenotalora commented 9 years ago

awesome! thanks for confirming @rorlig :)

Informatheus commented 9 years ago

Same problem, i had to stop using this lib cause i need com.android.support:design:22.2.1.

munimisu commented 8 years ago

I had to use it below way after I import the library as module. dependencies { compile project(':MaterialDesign') }

niwinnm commented 8 years ago

No need to import Material Design Library as library. I have forked the current version in here: https://github.com/vajro/MaterialDesignLibrary. I have modified the attribute "rippleColor" to "mRippleColor"

Hope it helps few people.

crashfiredeep commented 8 years ago

Hello, i got the same error then i followied above link and put the gradle line as shown below

dependencies { compile fileTree(dir: 'libs', include: ['.jar']) testCompile 'junit:junit:4.12' compile 'com.android.support:appcompat-v7:23.3.0' // compile 'com.github.navasmdc:MaterialDesign:1.5@aar' compile 'com.github.vajro:MaterialDesignLibrary:1.6' / updated version to solve ripple error*/ compile 'com.android.support:design:23.3.0' }

Then getting error Error:(26, 13) Failed to resolve: com.github.vajro:MaterialDesignLibrary:1.6 Show in File
Show in Project Structure dialog

saraelmoghazy commented 8 years ago

@niwinnm thank you very much ,it's working I was in this issue more than 4 hours searching for what's the problem , I'm very happy :)

niwinnm commented 8 years ago

@crashfiredeep - It's been working for me without issues. Did you import the maven repo for Jitpack inside your repositories? Like this: repositories { maven { url "https://jitpack.io" } }

github201407 commented 8 years ago

@niwinnm there has a error: Attribute application@label value=(@string/app_my_name) from AndroidManifest.xml:78:9-44 is also present at [com.github.vajro:MaterialDesignLibrary:1.6] AndroidManifest.xml:13:9-41 value=(@string/app_name). Suggestion: add 'tools:replace="android:label"' to element at AndroidManifest.xml:74:5-579:19 to override.

uses-sdk:minSdkVersion 14 cannot be smaller than version 16 declared in library [com.github.vajro:MaterialDesignLibrary:1.6]

*****build\intermediates\exploded-aar\com.github.vajro\MaterialDesignLibrary\1.6\AndroidManifest.xml Suggestion: use tools:overrideLibrary="com.gc.materialdesign" to force usage

niwinnm commented 8 years ago

@github201407 Well, we usually use 16 as our min SDK version at our company as it covers more than 95% of the Android devices. You could clone the our repo and edit it, if you really need 14 as minSdkVersion.

Regarding the other error: this should help you out: http://stackoverflow.com/questions/25981156/tools-replace-not-replacing-in-android-manifest