我正在尝试将图像上传到Firebase,我有以下代码可以解决上述错误
//getting the storage reference
StorageReference sRef = storageReference.child(SyncStateContract.Constants.STORAGE_PATH_UPLOADS + System.currentTimeMillis() + "." + getFileExtension(filePath));
具有使用此代码创建的常量类,以定义STORAGE_PATHS_UPLOADS
package com.otemainc.thevendor;
public class Constants {
public static final String STORAGE_PATH_UPLOADS = "uploads/";
public static final String DATABASE_PATH_UPLOADS = "uploads";
}
导致此错误的代码可能有什么问题?
答案 0 :(得分:1)
只需删除SyncStateContract类,因为它不是必需的,并且是导致错误的原因。