Expo android createAlbumAsync不起作用
我当前正在运行以下代码:Expo android createAlbumAsync不起作用,android,expo,Android,Expo,我当前正在运行以下代码: async createPhotoAlbum(currentOrderId, imgAsset) { console.log(imgAsset); const albumCreated = await MediaLibrary.createAlbumAsync(currentOrderId, imgAsset, false); console.log(albumCreated); return albumCreated } 在创建相册时,我收到以下错
async createPhotoAlbum(currentOrderId, imgAsset) {
console.log(imgAsset);
const albumCreated = await MediaLibrary.createAlbumAsync(currentOrderId, imgAsset, false);
console.log(albumCreated);
return albumCreated
}
在创建相册时,我收到以下错误:
[Unhandled promise rejection: Error: Could not get all of the requested assets]
根据Android上的文档,该文件必须是文件://
我已经确认这是imgAsset日志中的情况:
file:///data/user/0/host.exp.exponent/cache/ExperienceData/%2540impactcolor%252Feagle-eye-property-inspections/ImageManipulator/8c22caaa-361f-4fbf-9c60-b98d0d90e964.jpg
你知道为什么我不能在android上创建专辑吗?这适用于iphone