Android Studio - 在多个模块之间共享依赖关系会导致错误

问题描述 投票:1回答:1

我正在实施一个有两个模块的Android应用程序。 app模块使用library模块。在librarybuild.gradle文件中存在依赖关系:

api "se.emilsjolander:stickylistheaders:2.7.0"

这个库在app模块的xml文件中使用。

app's build.gradle文件包括library模块:

implementation project(path: ':Library', configuration: 'default')

现在的问题是,当我尝试在设备上运行时,我总是看到这个错误:

Android resource linking failed
error: attribute hasStickyHeaders not found.
error: attribute isDrawingListUnderStickyHeader not found.
error: failed linking file resources.

这是我正在使用的库:https://github.com/emilsjolander/StickyListHeaders

android android-gradle dependencies android-module
1个回答
0
投票

像github上的指示一样添加gradle依赖:

    dependencies {
        compile 'se.emilsjolander:stickylistheaders:x.x.x'
    }
© www.soinside.com 2019 - 2024. All rights reserved.