世博会android createAlbumAsync不起作用

时间:2020-02-12 00:47:36

标签: android expo

我当前正在运行以下代码:

async createPhotoAlbum(currentOrderId, imgAsset) {
  console.log(imgAsset);
  const albumCreated =  await MediaLibrary.createAlbumAsync(currentOrderId, imgAsset, false);
  console.log(albumCreated);
  return albumCreated
}

在albumCreated我收到以下错误:

[Unhandled promise rejection: Error: Could not get all of the requested assets]

根据Android上的文档,该文件必须为file:/// 我已经确认是imgAsset日志的情况:

file:///data/user/0/host.exp.exponent/cache/ExperienceData/%2540impactcolor%252Feagle-eye-property-inspections/ImageManipulator/8c22caaa-361f-4fbf-9c60-b98d0d90e964.jpg

有人知道为什么我无法在android上创建相册吗?在iPhone上可以使用。

0 个答案:

没有答案