布局没有看到库

时间:2016-09-05 10:35:17

标签: java android

PullToRefresh 已导入布局并撰写

<com.handmark.pulltorefresh.library.PullToRefreshListView
android: id = "@ + id / pull_to_refresh_listview"
android: layout_height = "fill_parent"
android: layout_width = "fill_parent" />

但为什么这个项目过得很快。将鼠标悬停在此组件上会写入

Can not find declaration to go to

告诉我如何修复此错误,有人能遇到吗?

UPD:LOGS

E/AndroidRuntime: FATAL EXCEPTION: main
                                                               java.lang.RuntimeException: Unable to start activity ComponentInfo{com.isakovch.aukg/com.isakovch.aukg.BottomItems.MainActivity}: android.view.InflateException: Binary XML file line #8: Error inflating class com.handmark.pulltorefresh.library.PullToRefreshListView

2 个答案:

答案 0 :(得分:0)

尝试同步gradle并执行项目的清理和重建。

编辑:

您需要添加

compile project(':mobihelp_sdk_android_v1.5.4')到你的gradle,但显然用你导入的模块的名称替换:mobihelp_sdk_android_v1.5.4,然后同步gradle它应该工作

答案 1 :(得分:0)

添加到gradle依赖项并同步:

dependencies {
    compile 'com.github.chrisbanes.actionbarpulltorefresh:library:0.9.9'
}