consp1racy / android-support-preference

Android Preferences according to Material design specs
Apache License 2.0
331 stars 49 forks source link

Unable to use the new Color Preference #25

Closed JoseGD closed 8 years ago

JoseGD commented 8 years ago

Hi, I couldn't get the new Color preference working.

After including in my gradle file the compile 'net.xpece.android:support-preference-color:0.6.0' line, I get

Error:Failed to resolve: xpece-android-support-preference:support-preference:unspecified

consp1racy commented 8 years ago

For now try

compile 'net.xpece.android:support-preference-color:0.6.0@aar'
compile 'net.xpece.android:support-preference:0.6.2'

Let me know if it still doesn't work. This will be fixed in 0.6.3 patch release.

JoseGD commented 8 years ago

The 1st line, ending with @aar, works. The 2nd causes the build to fail

consp1racy commented 8 years ago

Sorry, typo.

consp1racy commented 8 years ago

Version 0.7.0 should cause no issues in this regard.

JoseGD commented 8 years ago

Sorry to tell you that it is causing issues at least in my project: compile 'net.xpece.android:support-preference-color:0.7.0@aar' compiles. compile 'net.xpece.android:support-preference-color:0.7.0'doesn't compile.

consp1racy commented 8 years ago

Fixed for people who haven't touched it yet. Shouldn't be an issue in next releases, unless I forget it.

JoseGD commented 8 years ago

Still fails for me. Error message:

Error:Failed to resolve: xpece-android-support-preference:support-preference:[0.7.0,0.8.0)

Adding the @aar sufix solves the issue.

I don't know if this have something to do, but I have upgraded to Android Studio 2 yesterday, and to make sure I have the latest support library (I've seen the comment // depends on preference-v7 r23.3.0 in readme) I kept "Android Support Repository, rev 30" and removed "Android Support Library 23.2.1" in SDK Manager.

I've done this after asking asking in G+ (https://plus.google.com/+AndroidDevelopers/posts/iTDmFiGrVne) why I couldn't see the 23.3.0 release in SDK Manager. The docs say "Note: If you're developing with Android Studio, select and install the Android Support Repository item instead".

consp1racy commented 8 years ago

The issue is I currently have to manually fix the dependency from

xpece-android-support-preference:support-preference:unspecified

to

net.xpece.android:support-preference:[0.7.0,0.8.0)

when releasing the library.

The first time (0.6.0) i didn't know at all. The second time (0.7.0) I fixed only the version and didn't notice the groupId being wrong.

I uploaded fixed .pom file (maven metadata) but there's a million caches on the way to your Android Studio so you probably won't pick it up. For now you're stuck with @aar suffix and manually importing net.xpece.android:support-preference as well.

Thank you for letting me know and let's pray I get it right in next release.