Unchecked method 'into(Y)' invocation
实际运行是没问题的 但是这个警告是什么意思呢?
代码:
Glide.with(getApplicationContext()) .lad(internetUrl) .error(R.mipmap.ic_launcher) .into(simpleTarget); simpleTarget = new SimpleTarget<Drawable>(){ @Override public void onResourceReady(Drawable resource, GlideAnimation<? super Drawable> glideAnimation) { imageView_top.setImageDrawable(resource); } };
1 EdiTurn 2016-04-19 09:27:00 +08:00 into 接收的参数是 Y extends Target<TranscodeType>,猜测你 simpleTarget 的声明没有指定泛型。 另,在本例中, TranscodeType 需要是 GldieDrawable (见 load 的返回类型)。 |