PullToRefresh 导入Layout并编写
<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
告诉我如何修复这个错误,有人能遇到吗?
更新:日志
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
最佳答案
尝试同步 gradle 并对项目进行清理和重建。
编辑:
您需要添加
将project(':mobihelp_sdk_android_v1.5.4')
编译到您的gradle,但显然将:mobihelp_sdk_android_v1.5.4
替换为您导入的模块的名称,然后同步gradle,它应该可以工作
关于java - 布局看不到库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39328758/