Crouton depends on libraries but is not a library itself

自闭症网瘾萝莉.ら 提交于 2019-11-30 12:40: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?


回答1:


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'
}



回答2:


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'
}


来源:https://stackoverflow.com/questions/24450508/crouton-depends-on-libraries-but-is-not-a-library-itself

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!