MaterialDesignLibrary
MaterialDesignLibrary copied to clipboard
Cannot use with android support design library
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
i also faced the same problem.
Same problem...
you hava compile 'com.android.support:design:22.2.1' ?
does not work with 22.2.1 either
same
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.
"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
@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?
@rorlig
dependencies {
compile(':MaterialDesingLibrary:')
}
yes i clones the repo and included the library in my project and then include in build.gradle as you mentioned.. dependencies { compile(':MaterialDesingLibrary:') }
awesome! thanks for confirming @rorlig :)
Same problem, i had to stop using this lib cause i need com.android.support:design:22.2.1.
I had to use it below way after I import the library as module. dependencies { compile project(':MaterialDesign') }
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.
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
@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 :)
@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" } }
@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
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
@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