gpt4 book ai didi

android - Picasso for android 主要报错

转载 作者:太空狗 更新时间:2023-10-29 15:45:32 26 4
gpt4 key购买 nike

我在接下来的几行中使用了 Picasso:

    ImageView im = (ImageView)findViewById(R.id.picassotest);
Picasso.with(this).setLoggingEnabled(true);
Picasso.with(this).load("http://lacuadramagazine.com/wp-content/uploads/sangeh-monkey-forest-101.jpg").into(im);

但是当我运行应用程序时没有任何显示。我已经添加了 INTERNET 权限,但仍然没有任何反应。我从中得到的唯一日志行是:

 12-01 17:28:49.460 7453-7453/? D/Picasso: Main        created         [R0]    Request{http://lacuadramagazine.com/wp-content/uploads/sangeh-monkey-forest-101.jpg}
12-01 17:28:49.463 7453-7472/? D/Picasso: Dispatcher enqueued [R0]+5ms
12-01 17:28:49.464 7453-7474/? D/Picasso: Hunter executing [R0]+6ms
12-01 17:28:49.476 7453-7472/? D/Picasso: Dispatcher batched [R0]+18ms for error
12-01 17:28:49.479 7453-7453/? D/: HostConnection::get() New Host Connection established 0xb42d6b00, tid 7453
12-01 17:28:49.701 7453-7472/? D/Picasso: Dispatcher delivered [R0]+243ms
12-01 17:28:50.265 7453-7453/? D/Picasso: Main errored [R0]+807ms

我做错了什么?

最佳答案

我没有足够的积分来发表评论。

您是否尝试过使用 picasso 监听器来获取堆栈跟踪信息?

ImageView im = (ImageView)findViewById(R.id.picassotest);

Picasso picasso = new Picasso.Builder(this).listener(new Picasso.Listener() {
@Override
public void onImageLoadFailed(Picasso picasso, Uri uri, Exception exception) {
exception.printStackTrace();
}
}).build();

picasso.with(this).setLoggingEnabled(true);
picasso.with(this).load("http://lacuadramagazine.com/wp-content/uploads/sangeh-monkey-forest-101.jpg").into(im);

关于android - Picasso for android 主要报错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34031625/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com