Crouton depends on libraries but is not a library itself
Asked Answered
B

2

39

I'm using Android Studio 0.6.1, with Crouton library and today after gradle sync I got next error:

Error:A problem occurred configuring root project 'project_name'.
Module version de.keyboardsurfer.android.widget:crouton:1.8.4 depends on libraries but is not a library itself

That's going on?

Bahena answered 27/6, 2014 at 11:17 Comment(3)
I've got, same error here. Trying to resolve.Sandeesandeep
Still having this issue on my endBacchus
@Revedko Please post your answer and accept it instead of editing your question.Zeiler
B
62

This issue due to com.android.support-v4 recent update.

So I changed

compile 'com.android.support:support-v4:20.+'

to

compile 'com.android.support:support-v4:19.1.+'

and crouton works fine

Different workaround is to use @aar:

compile('de.keyboardsurfer.android.widget:crouton:1.8.4@aar') {
    exclude group: 'com.google.android', module: 'support-v4'
}
Bahena answered 28/6, 2014 at 16:38 Comment(6)
Thanks! This fixed it. How did you found this ?Hildegard
@ChristopheSmet I knew about support-v4 recent update and first think was: hmmm, what is about downgrade it? Second solution I found on crouton github issues page :)Bahena
Currently Crouton still is a jar. The upcoming version will only be deployed as aar and use the com.android.library plugin.Mickeymicki
Hi, unfortunately these solutions do not work for me, is there anything else I can do? ThanksGarget
Shouldn't it be: exclude group: 'com.android.support', module: 'support-v4'Explode
Second one is the general workaround for this problem :-) ThanksUsufruct
S
7

My solution according to @Revedko answer, using @aar and change all supports to version lower than 21 -> 20.+

dependencies {
    compile fileTree(dir: 'libs', include: ['*.jar'])
    compile 'com.loopj.android:android-async-http:1.+'
    compile "com.bugsense.trace:bugsense:3.5"
    compile('de.keyboardsurfer.android.widget:crouton:1.8.4@aar') {
        exclude group: 'com.google.android', module: 'support-v4'
    }
    compile 'com.android.support:appcompat-v7:20.+'
    compile 'com.google.android.gms:play-services:5.0.77'
}
Suicidal answered 4/7, 2014 at 19:56 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.