examples icon indicating copy to clipboard operation
examples copied to clipboard

Asset.fromURI expects a String, not an Object

Open sylvio-ruiz opened this issue 3 years ago • 0 comments

Describe the bug Bug: Asset.fromURI expects a String, not an Object Example: with-splash-screen File: ./App.js Version: expo-asset@~8.4.6

To Reproduce Just run the project

Expected behavior Get the asset

Additional context

image={{ uri: Constants.manifest.splash.image }}

  const startAsync = useCallback(
    // If you use a local image with require(...), use `Asset.fromModule`
    // If you use remote image, use `Asset.fromURI'
    () => Asset.fromURI(image.uri).downloadAsync(), // replace image by image.uri
    [image]
  );

Fixed

sylvio-ruiz avatar Apr 03 '22 15:04 sylvio-ruiz