Reputation: 2103
I'm trying to use Picasso library in my gradle-android project. I'm using eclipse IDE. When I make gradle build to my project, that is build correctly but in my *.java files, that are using Picasso, I get "Picasso cannot be resolved". Using Ctrl-Shift-R on eclipse I found the jar of Picasso but In the folders build/intermediate/pre-dexed/release and build/intermediate/pre-dexed/debug. My gradle file is below, Could you help me please?
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.android.tools.build:gradle:1.1.3'
}
}
apply plugin: 'com.android.application'
android {
compileSdkVersion 22
buildToolsVersion "22.0.1"
defaultConfig {
minSdkVersion 16
targetSdkVersion 22
}
}
repositories {
mavenCentral()
}
dependencies {
compile fileTree(dir: 'libs', include: '*.jar')
compile 'com.squareup.picasso:picasso:2.5.0'
}
dependencies {
//compile 'com.parse.bolts:bolts-android:1.+'
//compile fileTree(dir: 'libs', include: 'Parse-*.jar')
compile fileTree(dir: 'libs', include: '*.jar')
compile 'com.android.support:appcompat-v7:21.0.0+'
}
Upvotes: 0
Views: 949
Reputation: 1097
I had the same problem in using the Picasso library(Cannot be resolved). I faced it in eclipse. I don't know whether it would help you in Android studio. My solution was, I just deleted the libs folder in my project and created the same folder again. After that i copied my picasso jar file to that. And from that moment on wards import option is available for me and the error is gone. :-)
Upvotes: 0
Reputation: 979
to use Gradle you must use Android Studio https://developer.android.com/sdk/index.html
Eclipse does not support gradle, only Maven
Upvotes: 1