Even after clicking on Add Support Library and choosing version 19, eclipse still can\'t find android.support.v4.widget.SwipeRefreshLayout. Does anyone know how to get this
The SDK Manager update Android Support Library to 19.1.0. But when you use Android Tools > Add Support Library, eclipse update Android Support Library to 19.0. I think this is a bug. Copy Android Support Library 19.1.0 to libs folder manually.
It was difficult to update the support library to version 19.1 so i downloaded it manually from https://dl-ssl.google.com/android/repository/support_r19.1.zip and added the jar to my build path manually. works for me. I dont know why the 19 update shows instead of 19.1.0
So it turns out the library is in the following location
/android-sdk-macosx/extras/android/m2repository/com/android/support/support-v4/19.1.0
As opposed to the usual
/android-sdk-macosx/extras/android/support
Also I had to restart eclipse and go to Android SDK Manager
over and over and over, until the 19.1.0 version shows up.
I hope this saves someone else some trouble.
It looks as if you don't have the android-support-v4.jar in Java Build Path. Add it from the android-support-v7-appcompat.
For some reason, even though you may include v4 support library
or you may have v7-appcompat
included in your project, you may not be able to import SwipeRefreshLayout
.
You need to make sure that
target=android-19
to target=android-22
(It should be anything greater that 19) and import android.support.v4.widget.SwipeRefreshLayout;
in your activity which will resolve the import related issue. In androidx
, add
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
inorder to use SwipeRefreshLayout