作者:手机用户2602929277 | 来源:互联网 | 2023-05-21 12:45
我收到此错误,请帮帮我.
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文件中添加这些行.但同样的错误来了.我现在该怎么办 请帮我.
你能告诉我如何添加毕加索图书馆吗?
1> ojonugwa och..:
将此添加到您的依赖项中build.gradle
:
![在此输入图像描述](https://img.php1.cn/3cd4a/1eebe/cd5/ea91d84a82557da5.webp)
dependencies {
implementation 'com.squareup.picasso:picasso:2.71828'
...
或这个:
dependencies {
implementation 'com.squareup.picasso:picasso:2.71828'
...
最新版本可以在这里找到
确保已连接到Internet.同步gradle时,所有相关文件都将添加到项目中
看看你的库文件夹,你刚刚添加的库应该在那里.
![在此输入图像描述](https://img.php1.cn/3cd4a/1eebe/cd5/d67981797265d9c7.webp)
2> vuhung3990..:
![最简单的方法来增加依赖性](https://img.php1.cn/3cd4a/1eebe/cd5/eec57030b649a106.webp)
希望这有助于你或Ctrl+ Alt+ Shift+ S=>选择依赖选项卡并找到你需要的东西(见我的图片)
加上1为gif视频
3> Manikanta Re..:
在Dependency中添加picasso库
dependencies {
...
implementation 'com.squareup.picasso:picasso:2.71828'
...
}
同步项目在布局中创建一个图像视图
在Manifest文件中添加Internet权限
//初始化ImageView
ImageView imageView = (ImageView) findViewById(R.id.imageView);
//将图片从url下方加载到imageView中
Picasso.get()
.load("YOUR IMAGE URL HERE")
.into(imageView);