2

我在让这个库工作时遇到了一些麻烦。有问题的库是 PullToRefresh,根据 Android Studio 的说法,库中存在一些文件错误,导致它无法正常工作。该项目可以很好地编译,但是一旦它尝试在我的设备上运行它,它就会显示“已停止工作”,并且 LogCat 会喷出一些关于 LayoutInflater 不正确的信息。其他人的工作正常,所以我怀疑是图书馆有错误,但如果有人能帮我解决这个问题,我将不胜感激。我已经将 actionbarsherlock 用作库并且它运行良好,我尝试删除 actionbarsherlock 只是为了看看这是否是问题并且错误仍然发生。

这就是 android studio 关于为什么不能使用该库的原因。如果需要,请索要 logcat。

Rendering Problems The following classes could not be instantiated:
- com.handmark.pulltorefresh.library.PullToRefreshScrollView (Open Class, Show Exception)
Tip: Use View.isInEditMode() in your custom views to skip code or show sample data when shown in the IDE  
Exception Details java.lang.NullPointerException   
at com.handmark.pulltorefresh.library.internal.LoadingLayout.<init>(LoadingLayout.java:83)   
at com.handmark.pulltorefresh.library.internal.RotateLoadingLayout.<init>(RotateLoadingLayout.java:42)   
at com.handmark.pulltorefresh.library.PullToRefreshBase$AnimationStyle.createLoadingLayout(PullToRefreshBase.java:1328)   
at com.handmark.pulltorefresh.library.PullToRefreshBase.createLoadingLayout(PullToRefreshBase.java:587)   
at com.handmark.pulltorefresh.library.PullToRefreshBase.init(PullToRefreshBase.java:1108)   
at com.handmark.pulltorefresh.library.PullToRefreshBase.<init>(PullToRefreshBase.java:113)   
 at com.handmark.pulltorefresh.library.PullToRefreshScrollView.<init>(PullToRefreshScrollView.java:33)   
at java.lang.reflect.Constructor.newInstance   
at android.view.LayoutInflater.rInflate_Original   
at android.view.LayoutInflater_Delegate.rInflate   
at android.view.LayoutInflater.rInflate   
at android.view.LayoutInflater.inflate   
at android.view.LayoutInflater.inflate 
4

0 回答 0