无法使用滑行在图像视图中加载图像

can't load images in Image View using glide

我正在使用 glide 库以在网格视图中显示图像,但我的图像视图中没有显示注释。我得到一个错误:

E/Glide: class com.bumptech.glide.load.engine.GlideException: Failed to load resource

我的代码在使用位图时工作正常。这是我的代码:

    @Override
        public View getView(final int position,  View convertView, ViewGroup parent) {
            Log.e("sara" , "this part takes time");


            LayoutInflater inflater = getLayoutInflater();


            convertView = getLayoutInflater().inflate(R.layout.gallery_gridsq, parent, false);
            iv = (ImageView) convertView.findViewById(R.id.icon);
            file = new File(Uri.parse(getItem(position).toString()).getPath());
            Uri imageUri = Uri.fromFile(file);
            Glide
                    .with(Gallery2.this)
                    .load(imageUri)
                    .into(iv);


            return convertView;
        }

关于 Github 上的 Glide 看到这个 issue 可能对你有帮助。