在android中,如何在毕加索中传递变量?

在android中,如何在毕加索中传递变量?,android,picasso,universal-image-loader,android-glide,Android,Picasso,Universal Image Loader,Android Glide,我以前用毕加索在安卓系统中加载过图像,但这次无法显示。我使用bundle将变量值从一个活动发送到另一个活动,我可以在其他活动中获取它,我可以在我的logcat中看到它,但毕加索没有加载它。以下是我的尝试: Picasso.with(UserAreaActivity.this).load(pic).into(im); 这里pic是一个字符串变量,它由url组成,我在logcat info中检查pic是否从另一个活动获取url,它显示它有url,但是为什么毕加索不显示它呢 以下是imagevie

我以前用毕加索在安卓系统中加载过图像,但这次无法显示。我使用bundle将变量值从一个活动发送到另一个活动,我可以在其他活动中获取它,我可以在我的logcat中看到它,但毕加索没有加载它。以下是我的尝试:

 Picasso.with(UserAreaActivity.this).load(pic).into(im);
这里pic是一个字符串变量,它由url组成,我在logcat info中检查pic是否从另一个活动获取url,它显示它有url,但是为什么毕加索不显示它呢

以下是imageview的xml代码:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
    xmlns:app="http://schemas.android.com/apk/res-auto"
    xmlns:tools="http://schemas.android.com/tools"
    android:layout_width="match_parent"
    android:layout_height="match_parent"
    android:orientation="vertical"
    tools:context="com.letslogin.UserAreaActivity"
    android:background="@color/blue"
    android:weightSum="1">
 <ImageView
        android:id="@+id/im"
        android:layout_width="match_parent"
        android:layout_height="100sp"
        app:srcCompat="@mipmap/ic_launcher"
        android:layout_weight="0.41" />
</LinearLayout>


您在分配im时是否进行了findViewById?日志中有错误吗?您没有提供足够的代码来查看问题所在。是的,伙计,我显然找到了ViewById,我现在可以看到图像,问题是图像太大,无法加载,所以我添加了。调整大小(100100)和。centercrop()到毕加索代码。现在开始工作了。你分配即时通讯时做过findViewById吗?日志中有错误吗?您没有提供足够的代码来查看问题所在。是的,伙计,我显然找到了ViewById,我现在可以看到图像,问题是图像太大,无法加载,所以我添加了。调整大小(100100)和。centercrop()到毕加索代码。现在它开始工作了。