I have just updated Material Design Support Lib to v23.0.1 and now, my code doesn't compile anymore.
Attribute "barLength" has already been defined
/Users/admin/Documents/workspace/MyApp/app/build/intermediates/exploded-aar/com.android.support/appcompat-v7/23.0.1/res/values-v23/values-v23.xml
Error retrieving parent for item: No resource found that matches the given name 'android:TextAppearance.Material.Widget.Button.Inverse'.
Error retrieving parent for item: No resource found that matches the given name 'android:Widget.Material.Button.Colored'.
What should I do?
EDIT:
The 2 libs that gives me the error are:
compile 'com.android.support:design:22.2.0'
compile 'com.android.support:appcompat-v7:22.2.0'
Make sure you do not have any attribute named "barLength". In my case a custom ProgressWheel caused the issue, renamed attr name and problem resolved.
The android:TextAppearance.Material.Widget.Button.Inverse and android:Widget.Material.Button.Colored error is due to you are still using Android Lollipop (API 21) compiler. Change your compileSdkVersion to 23.
Attribute "barLength" has already been defined error is due to your Gradle version is outdated. Go to Preference -> Build, Execution, Deployment -> Build Tools -> Gradle, change Gradle home to the latest Gradle version (Mine is gradle-2.4)
Remember to change your project build.gradle to use the following:
dependencies {
classpath 'com.android.tools.build:gradle:1.4.0'
}
And also change your buildToolsVersion to 22.0.1.
Edit:
I noticed that you're using ProgressWheel library, created by Todd Davies. There is a conflict of declare-styleable, i.e. the barLength dimension. In that case you'll need to import Progress Wheel as a module in Android Studio and change the name of the attribute.
Make sure you update your libraries that use the support library to use the same version as the project's support library
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