毕加索库无法加载图像 – Android Studio

huangapple 未分类评论43阅读模式
英文:

Picasso Library doesn't load images - Android Studio

问题

我正在使用Android Studio(Java)编写一个小型天气应用程序,并且在使用Picasso库时遇到了问题。无论是在模拟器中还是在我的测试设备上的应用中,图像都无法加载。

我已经像这样导入了这个库:

import com.squareup.picasso.Picasso;

这是我用来获取并显示图像的代码片段,通常情况下可以正常工作:

Picasso.get().load(url).into(imgWeatherIcon);

URL是正常的,所以这不可能是问题的原因。

我已经在进行异步API Get请求的时候使用了Volley HTTP库,目前我能想到的唯一原因就是这个库的使用可能导致Picasso方法无法正常工作。

英文:

I'm writing a small weather app in Android Studio (Java), and I'm having trouble with the Picasso library.
The images won't load, neither in the emulator, nor in the app on my test device.

I've imported the library like so:

import com.squareup.picasso.Picasso;

This is the piece of code that I'm using to get and display the image, and normally works fine:

Picasso.get().load(url).into(imgWeatherIcon);

The url works fine, so this can't be the reason for the problem.

I'm already using the Volley HTTP library for asynchronous API Get requests, which at this point is the only reason I can think of why the Picasso methods are not working.

huangapple
  • 本文由 发表于 2020年7月24日 22:28:57
  • 转载请务必保留本文链接:https://java.coder-hub.com/63075688.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定