0

I want to create a swipe to refresh layout but this exeption is raised. Exception details are logged in Window > Show View > Error Log The following classes could not be found: - android.support.v4.widget.SwipeRefreshLayout (Fix Build Path, Edit XML, Create Class)

<?xml version="1.0" encoding="utf-8"?>
<android.support.v4.widget.SwipeRefreshLayout
    xmlns:android="http://schemas.android.com/apk/res/android"
    android:id="@+id/swipe_container"
    android:layout_width="match_parent"
    android:layout_height="match_parent">

    <ScrollView android:layout_width="match_parent"
        android:layout_height="match_parent">

        <TextView android:text="swipe"
            android:layout_width="match_parent"
            android:layout_height="wrap_content"
            android:layout_marginTop="16dp"
            android:gravity="center"/>

    </ScrollView>

</android.support.v4.widget.SwipeRefreshLayout>
reixa
  • 6,903
  • 6
  • 49
  • 68
Jewel
  • 13
  • 1
  • 6
  • Check http://stackoverflow.com/a/23325011/2700586 and http://stackoverflow.com/a/3643015/2700586 – Mani Dec 10 '14 at 09:28

1 Answers1

0

=== Update ===

It seems support-v4 is not identical in your all projects. Just do one thing, make all support-v4 same (copy from one to other projects)

=== Update ===

There must be something wrong with library your dependency. Share more details so we can look into.

This is Google official sample for swipe to refresh layout:

https://github.com/googlesamples/android-SwipeRefreshListFragment

You can refer this.

Yashdeep Patel
  • 3,090
  • 1
  • 17
  • 21
  • console messege: Jar mismatch! Fix your dependencies Found 2 versions of android-support-v4.jar in the dependency list, SwipeTest] but not all the versions are identical (check is based on SHA-1 only at this time). how can i fix it? – Jewel Dec 10 '14 at 10:03
  • It seems support-v4 is not identical in your all projects. Just do one thing, make all support-v4 same (copy from one to other projects). – Yashdeep Patel Dec 10 '14 at 10:11