I started developing for Android in my work and they asked me to start by changing some simple things from an already existing project, which works and has already been released (the version I'm trying to test). But I can not run it at all.
I was advised to create a new project and move everything from the old (which is not grandle-based) to this one. I did this and after some effort I was able to import the facebook and google libraries into the buid.grandle dependencies. My problem is with the com.handmark.pulltorefresh.library library which gives the same problems as the others before compiling, so I use the command:
compile 'com.github.chrisbanes.pulltorefresh:library:2.1.1'
The error appears:
Warning: Packaging for dependency com.github.chrisbanes.pulltorefresh: library: 2.1.1 is 'apklib' and is not supported. Only 'aar' libraries are supported.
I think this is only missing for my application to run. But if it does not work, would there be a better solution to make it work in Android Studio?
Here is the code for my buid.grandle:
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
applicationId "com.example.aevo.talk_talk"
minSdkVersion 15
targetSdkVersion 22
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
compile fileTree(dir: 'libs', include: ['*.jar'])
compile 'com.android.support:appcompat-v7:22.1.1'
compile 'com.google.android.gms:play-services:6.1.71'
compile 'com.facebook.android:facebook-android-sdk:3.23.+'
compile 'com.github.chrisbanes.pulltorefresh:library:2.1.1'
}
And what I want to import:
import com.handmark.pulltorefresh.library.PullToRefreshBase;
import com.handmark.pulltorefresh.library.PullToRefreshListView;
import com.handmark.pulltorefresh.library.PullToRefreshBase.OnRefreshListener;