android - 如何在android studio中添加 picasso 库

标签 android android-studio picasso

我遇到了这个错误,请帮助我。

     Error:A problem occurred configuring project ':app'.
> Cannot evaluate module picasso-master : Configuration with name 'default' not found.

到目前为止完成:

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'
}

我也在构建 gradle 文件中添加了这些行。但同样的错误来了。我现在该怎么办。请帮帮我。

您能告诉我如何添加 picasso 图书馆吗?

最佳答案

将此添加到 build.gradle 中的依赖项:

enter image description here

dependencies {
 implementation 'com.squareup.picasso:picasso:2.71828'
  ...

最新版本可以找到here

确保您已连接到 Internet。当您同步 Gradle 时,所有相关文件都将添加到您的项目中

看看你的库文件夹,你刚刚添加的库应该在里面。

enter image description here

关于android - 如何在android studio中添加 picasso 库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28603191/

相关文章:

ios - CFURLRequestSetHTTPCookieStorageAcceptPolicy_block_invoke : no longer implemented and should not be called

android - build.gradle文件的任何更改都会导致android studio使用此脚本卡住

android-studio - Android Studio AVD 管理器不选择任何内容

android - 加载图像后测量 ImageView

android - E/OpenGLRenderer:Getting MAX_TEXTURE_SIZE from GradienCache Error while using Picasso 和 okhttp in genymotion

android - 使用 Picasso 将图像加载到 ImageView

java - 在 Jitpack 的脚本中,所有 buildscript {} block 必须出现在任何插件 {} block 之前

java - 从 Cordova 5.0.0 访问 appView

java - 转换到一组新的 ListView 项目?

java - 如何为每个子类创建一个 ArrayList?