Reputation: 265
I am getting this error, please help me.
Error:A problem occurred configuring project ':app'.
> Cannot evaluate module picasso-master : Configuration with name 'default' not found.
Done so far :
1. download the picaso
2.unzip the zip folder
3.Under project section created one directory called as lib and add the unzip file
4. In settings-gradle
include ':app'
include ':libs:picasso-master'
wrote these lines.
5. after that in project structure module dependency add the picasso library
6. rebuild and clean
7.
dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:21.0.3'
compile project(':library:picasso-master')
compile 'com.squareup.picasso:picasso:2.5.0'
}
i add these lines in build gradle file too. but same error coming. what shall i do now. please help me.
Could you please tell me how I add picasso library?
Upvotes: 26
Views: 134472
Reputation: 47
Dependency
dependencies {
implementation 'com.squareup.picasso:picasso:2.71828'
}
//Java Code for Image Loading into imageView
Picasso.get().load(werURL).into(imageView);
Upvotes: 4
Reputation: 641
Add the Picasso library in Dependency
dependencies {
...
implementation 'com.squareup.picasso:picasso:2.71828'
...
}
Sync The Project Create one imageview in Layout
<ImageView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:id="@+id/imageView"
android:layout_alignParentTop="true"
android:layout_centerHorizontal="true">
</ImageView>
Add the Internet permission in Manifest file
<uses-permission android:name="android.permission.INTERNET" />
//Initialize ImageView
ImageView imageView = (ImageView) findViewById(R.id.imageView);
//Loading image from below url into imageView
Picasso.get()
.load("YOUR IMAGE URL HERE")
.into(imageView);
Upvotes: 11
Reputation: 27255
Add this to your dependencies in build.gradle
:
dependencies {
implementation 'com.squareup.picasso:picasso:2.71828'
...
The latest version can be found here
Make sure you are connected to the Internet. When you sync Gradle, all related files will be added to your project
Take a look at your libraries folder, the library you just added should be in there.
Upvotes: 53
Reputation: 6849
hope this help you or Ctrl + Alt + Shift + S => select Dependencies tab and find what you need ( see my image)
Upvotes: 23