Skip to content
This repository has been archived by the owner on Oct 15, 2018. It is now read-only.

Gradle build includes ancient support-lib-v4 #54

Open
arberg opened this issue Dec 11, 2015 · 3 comments
Open

Gradle build includes ancient support-lib-v4 #54

arberg opened this issue Dec 11, 2015 · 3 comments

Comments

@arberg
Copy link

arberg commented Dec 11, 2015

The Gradle build
compile 'com.github.chrisbanes.bitmapcache:library:2.3'
will cause inclusion of support-v4 from maven-central
http://mvnrepository.com/artifact/com.google.android/support-v4/r7

This is an ancient release from 2012. The new releases are in android-sdk downloaded and updated via SDK manager. They appear to not be in maven central.

In my particular case I lost access to the class ViewCompat after including the bitmap-cache library via gradle (using compile 'com.github.chrisbanes.bitmapcache:library:2.3').

I think it will be a build problem if the gradle build forces inclusion of a particular version of the support lib, including if it forces newest version via '+'. I'm no Gradle 'expert' but it seems others have solved the problem of dependencies eg. me.henrytao:mdcore:1.2.0 (or I just havn't run into problems there yet).

Best Alex

PS: Seems to be awesome library though, thank you for sharing.

@arberg
Copy link
Author

arberg commented Dec 11, 2015

I found I could exclude the dependencies like this: compile('com.github.chrisbanes.bitmapcache:library:2.3'){
exclude group: 'com.google.android'
}
compile 'com.android.support:support-v4:23.1.1'

I still think this project should include the newest support-lib-v4 (as it claims to to in front-page). I admit it is a neat trap that the most recent version on maven is ancient.

Its also possible to manually choose version of DiskLruCache like this but its probably not safe if different version of DiskLruCache is included, as a future version of DiskLru may not play well with BitmapCache.
compile('com.github.chrisbanes.bitmapcache:library:2.3'){
exclude group: 'com.jakewharton'
}
compile 'com.jakewharton:disklrucache:2.0.2'

@bkhall
Copy link

bkhall commented Feb 18, 2016

@arberg Thanks for posting a quick fix to this problem.

@chrisbanes Please remove the android-support jar from this library.

I wasted 4+ hours trying to find where this duplicate jar was coming from.

@arberg
Copy link
Author

arberg commented Feb 19, 2016

Hi @bkhall

@chrisbanes has not updated repository for 2 years, so I would say its dead.

farfromrefug (https://github.com/Akylas/Android-BitmapCache/) made lots of updates in 2014 that was never pulled. I pushed my changes to farfromrefug(Akylas) but those have not yet been accepted. So today this is the most update version of the repository, I believe (as I pulled from farfromrefug):

https://github.com/arberg/Android-BitmapCache/

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants