https://github.com/chrisbanes/Android-PullToRefresh/を使用しようとしています。例に従いましたが、エラー java.lang.NoSuchFieldError: com.handmark.pullrefresh.library.R$id.pull_to_refresh_sub_text が発生しました
これは私のグリッドです:
<com.handmark.pulltorefresh.library.PullToRefreshGridView
xmlns:ptr="http://schemas.android.com/apk/res/com.abc.myproject"
android:id="@+id/gv_image"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:listSelector="#00000000"
android:padding="4dp"
android:horizontalSpacing="4dp"
android:verticalSpacing="4dp"
android:gravity="center"
android:numColumns="3"
android:columnWidth="128px"
android:stretchMode="columnWidth"
ptr:ptrMode="pullDownFromTop"
ptr:ptrDrawable="@drawable/android" />
実行すると、上記の例外があります。PullToRefresh を別のプロジェクトとしてワークスペースに追加し、それを自分のプロジェクトのライブラリにしました。Jarファイルも追加しました。エラーは行 xmlns:ptr="http://schemas.android.com/apk/res/com.abc.myproject" が原因だと思いますか?
コードをトレースしたところ、例外の原因となった行は LoadingLayout.java にあります。
私は何か間違ったことをしていますか?
ありがとう!