// Create a storage reference from our appvalstorageRef=storage.reference// Create a reference to the file to deletevaldesertRef=storageRef.child("images/desert.jpg")// Delete the filedesertRef.delete().addOnSuccessListener{// File deleted successfully}.addOnFailureListener{// Uh-oh, an error occurred!}
// Create a storage reference from our appStorageReferencestorageRef=storage.getReference();// Create a reference to the file to deleteStorageReferencedesertRef=storageRef.child("images/desert.jpg");// Delete the filedesertRef.delete().addOnSuccessListener(newOnSuccessListener<Void>(){@OverridepublicvoidonSuccess(VoidaVoid){// File deleted successfully}}).addOnFailureListener(newOnFailureListener(){@OverridepublicvoidonFailure(@NonNullExceptionexception){// Uh-oh, an error occurred!}});