How to use import Android-PullToRefresh - android

https://github.com/chrisbanes/Android-PullToRefresh
From this link url
I using android studio and i want to import library to my project, other library has dependencies it's easy to use like
dependencies {
compile 'com.android.xxxxxx
}
But this library has not, How can i import this library to my project Thank you

you don't need that project, get Android support library and try this tutorial:
http://antonioleiva.com/swiperefreshlayout/

You can try this:
compile group: 'com.github.chrisbanes.pulltorefresh', name: 'parent', version: '2.1.1'
found here:
https://mvnrepository.com/artifact/com.github.chrisbanes.pulltorefresh/parent/2.1.1
or use this library derived from this one:
https://github.com/naver/android-pull-to-refresh/wiki/Quick-Start-Guide

Related

How to import library URLEncodedUtils in android studio?

I want to import org.apache.http.client.utils.URLEncodedUtils in android studio. It have to add library in build gradle I add this code
implementation 'org.apache.httpcomponents:httpclient:4.5.6'
It show error like this.
httpclient defines classes that conflict with classes now provided by
Android. Solutions include finding newer versions or alternative
libraries that don't have the same problem (for example, for
httpclient use HttpUrlConnection or okhttp instead), or repackaging
the library using something like jarjar.
If I remove implementation in build gradle it show error can not resolv symbol URLEncodedUtils.
How to import library URLEncodedUtils android studio ?
Remove implementation 'org.apache.httpcomponents:httpclient:4.5.6'
and add this to your gradle:
android {
useLibrary 'org.apache.http.legacy'
}
You also may try to download and include HttpClient jar directly into your project or use OkHttp instead.
Hope this help!
Add next block to build.gradle located in app module
configurations {
all {
exclude module: 'httpclient'
}
}

DrawableWrapper missing from support v4 library

I tried replacing a local jar of the android-support-v13 library with a maven dependency like this
compile files('libs/android-support-v13.jar')
replaced with
compile 'com.android.support:support-v13:21.0.0'
However, when I try to compile this import fails
import android.support.v4.graphics.drawable.DrawableWrapper;
Has this class been removed from the support library?
Try:'compile com.android.support:support-v13:24.2.0'
Version 21 of support library is quite old and so may not contain the needed class.

Many troubles importing a library into AndroidStudio

So I'd like to import the "apache commons ftp" libraries for use in my project. I got as far as the importing the modules, and am including a pic just to show that they're in there.
But when I try to use the import statements
(i.e.) import org.apache.commons.net.ftp.FTP;
they fail.
So am curious if I am missing a step, or am missing something.
Please add below dependency in your gradle:
// https://mvnrepository.com/artifact/commons-net/commons-net
compile group: 'commons-net', name: 'commons-net', version: '3.5'
For any dependency to import in Android Studio through gradle use below reference:
https://mvnrepository.com/
This will save your time from importing module and solving gradle errors :)
Thank You
I would recommand AndiGeeky's answer if you don't modify so you have a custom library.
Meanwhile if you really want to use the library as a module, you can add this line in your build.gradle in your module app
compile project(':NAME_OF_YOUR_MODULE') << should be commons-net-3.5
Hope that will help you :)

How to import github library in eclipse

I am trying to use material designing library https://github.com/drakeet/MaterialDialog from github in my eclipse but I didnt found any jar file in this library project. So how can I use this library in my project in eclipse
If you have a Gradle build, as mentioned in the README, you just add:
dependencies {
compile 'me.drakeet.materialdialog:library:1.2.2'
}
As explained in the blog post, this looks like (in Android Studio)
You have to convert this library project from gradle to eclipse. You can get many links over the web for it. Try this.
The library project you are looking is build into android studio(Gradle). So I recommend you to use android studio instead of eclipse.
I recommend you to use Android Studio with Gradle support by default. But if you want use Eclipse download Gradle plugin and add this lib as dependency
dependencies {
compile 'me.drakeet.materialdialog:library:1.2.2'
}

Add android-numberpicker backport to Android Studio Gradle project

I want to use this library in my Android Studio project https://github.com/SimonVT/android-numberpicker. I can't for the life of me figure out how to add it to my project. Can someone just outline how this would work? I've only ever added libraries that were contained in jar files.
In build.gradle, use:
dependencies {
compile group: 'net.simonvt', name: 'android-numberpicker-parent', version: '1.0.0'
}
If you are using new gradle build system (and you really should), just add
compile 'net.simonvt:android-numberpicker:1.0.0'
to your build.gradle's dependencies section.
I found a forked version of this library which can be imported from source as a module in Android Studio. It is available here:
https://github.com/heavyplayer/android-numberpicker

Categories

Resources