为什么单词“ storage”上出现错误行,在Android上删除文件?

时间:2018-09-04 13:05:48

标签: java android firebase firebase-storage

Delete Files on Android...如此处所述,为什么“存储”一词有误?

StorageReference storageRef = storage.getReference();

StorageReference desertRef = storageRef.child("Tuition Image");

desertRef.delete().addOnSuccessListener(new OnSuccessListener<Void>() {
    @Override
    public void onSuccess(Void aVoid) {
        // File deleted successfully
    }
}).addOnFailureListener(new OnFailureListener() {
    @Override
    public void onFailure(@NonNull Exception exception) {
        // Uh-oh, an error occurred!
    }
});

1 个答案:

答案 0 :(得分:2)

您是否已首先实现此功能?

FirebaseStorage storage = FirebaseStorage.getInstance();