8
I started developing for Android in my work and I was asked to start exchanging some simple things from an existing project, which works and has even been released (the version I’m trying to test). But I can’t spin it at all.
I was advised to create a new project and pass everything from the old (which is not grandle-based) to this one. I did that and after some effort I managed to import the Facebook and Google libraries into the buid.grandledependencies. My problem is with the library with.handmark.pulltorefresh.library that gives the same problems as the others before compiling, so I use the command:
compile 'com.github.chrisbanes.pulltorefresh:library:2.1.1'
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 believe that’s all that’s left for my application to run. But if it doesn’t work, there would be some better solution for me to be able to make work in Android Studio?
Here’s the code to 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 matter:
import com.handmark.pulltorefresh.library.PullToRefreshBase;
import com.handmark.pulltorefresh.library.PullToRefreshListView;
import com.handmark.pulltorefresh.library.PullToRefreshBase.OnRefreshListener;
Take a look at the answer to that question http://stackoverflow.com/questions/17040558/is-it-possible-to-add-apklibs-to-dependencies-with-intellij
– FelipeJM