毕加索只在一个模拟器上工作

Picasso is just working on one emulator

我可以在模拟器上成功加载我的图像(Android 7.0 API24)

我用的Picasso版本是

compile 'com.squareup.picasso:picasso:2.5.2'

当我 运行 投影到其他计算机上的另一个模拟器或我的 android 设备即 Huaweb mate8(Android 7.0 API24) 时,我无法再加载我的图像,它显示错误图片。

不知道为什么会这样

这是我的 imageUrl="http://192.168.22.111:2212/DB/Convention/1.jpg" 任何模拟器和我的 android 设备都使用相同的 WIFI。

我的代码:

Picasso.with(getActivity()).load(imageUrl).centerCrop().fit()
                    .placeholder(R.drawable.button_icon_apply_128x128)
                    .error(R.drawable.app_icon_512x512)
                    .into(destImage, new com.squareup.picasso.Callback() {
                        @Override
                        public void onSuccess() {
                            Log.i(TAG, "onSuccess: TRUE");
                        }

                        @Override
                        public void onError() {
                            Log.i(TAG, "onError: TRUE");
                        }
                    });

我的 imageView xml:

<ImageView
            android:id="@+id/destImage"
            android:layout_width="wrap_content"
            android:layout_height="150dp"
            android:scaleType="fitXY"
            android:adjustViewBounds="true"
            android:layout_gravity="center" />

如有任何帮助,我们将不胜感激。提前致谢。

您的测试设备是否已连接到互联网(或您的专用网络)? 运行 用于检查的网络浏览器。

您的模拟器可以使用您 PC 的网络,而不是使用真正的 wifi。

在您的设备中加载您的 URL 网络浏览器。