gradle - 使用gradle的ActionBarSherlock和swipelistview

标签 gradle actionbarsherlock swipeview

我需要在项目中使用ActionBarSherlockSwipeListView。我在build.gradle文件中添加了以下依赖项:

compile 'com.actionbarsherlock:actionbarsherlock:4.4.0@aar'
compile('com.fortysevendeg.swipelistview:swipelistview:1.0-SNAPSHOT@aar') {
   transitive = true
}

我收到以下错误:Attribute xxx has already been defined。我想这个问题是因为SwipeListView使用appcompat-v7作为依赖项,并且ActionBarSherlock和v7不兼容,因为您可以看到here

使用gradle在我的项目中同时使用ActionBarSherlockSwipeListView的正确方法是什么?

最佳答案

我在构建期间排除了appcompat-v7 lib。到目前为止,它似乎仍然有效。但是我担心它可能会在某些设备上崩溃

compile ('com.fortysevendeg.swipelistview:swipelistview:1.0-SNAPSHOT@aar') {
        transitive = true
        exclude module: 'support-v4'
        exclude module: 'appcompat-v7'
        compile 'com.android.support:support-v4:13.0.0'
    }

我已经打开一个问题:https://github.com/47deg/android-swipelistview/issues/191来查看是否需要依赖。

关于gradle - 使用gradle的ActionBarSherlock和swipelistview,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/26367882/

相关文章:

android - android sherlock actionbar 与 iOS 中的 UINavigationBar 相同吗?

android - Sherlock 操作栏 RTL

android - 在 android studio 0.3.1 中使用 ActionbarSherlock 的编译错误

javascript - Swipeview - 显示下一项的预览/片段?

java - Heroku[web.1] : State changed from starting to crashed

gradle - 获取数组中所有文件/文件夹的名称

当标签 View 充满文本时,Android View Pager 滑动标签 View 太重

带有 View 寻呼机的Android滑动 View

gradle - 如何在gradle中的Exec任务中使用项目中的变量值?

gradle - 在Eclipse InternalTestExecutionException中使用Gradle运行Spock测试时出错