I have an intent where the user selects an image from their gallery. I want to load this image into an ImageView using the Glide library. It seems like it can't handle the URI that is being passed into Glide
        addPhotos.setOnClickListener(new View.OnClickListener() {
        @Override
        public void onClick(View view) {
            ActivityCompat.requestPermissions(CreateEvacuationProcedureActivity.this,new String[]{Manifest.permission.READ_EXTERNAL_STORAGE},1);
            Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT);
            intent.addCategory(Intent.CATEGORY_OPENABLE);
            intent.setType("image/*");
            startActivityForResult(intent, OPEN_DOCUMENT_CODE);
        }
    });
    @Override
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
    if (requestCode == OPEN_DOCUMENT_CODE && resultCode == RESULT_OK) {
        if (data != null) {
            // this is the image selected by the user
            Uri imageUri = data.getData();
            System.out.println(new File(imageUri.getPath()));
            Glide.with(this)
                    .load(imageUri.getPath()) // Uri of the picture
                    .listener(new RequestListener<Drawable>() {
                        @Override
                        public boolean onLoadFailed(@Nullable GlideException e, Object model, Target<Drawable> target, boolean isFirstResource) {
                            System.out.println(e.toString());
                            return false;
                        }
                        @Override
                        public boolean onResourceReady(Drawable resource, Object model, Target<Drawable> target, DataSource dataSource, boolean isFirstResource) {
                            return false;
                        }
                    })
                    .into(imageOne);
        }
    }
}
I am getting the following error in the console from Glide:
I/Glide: Root cause (1 of 2)
java.io.FileNotFoundException: /document/image:2442 (No such file or directory)
 
     
     
    