expo / examples

Example projects that demonstrate how to use Expo APIs and integrate Expo with other popular tools
2.23k stars 867 forks source link

Asset.fromURI expects a String, not an Object #366

Open sylvio-ruiz opened 2 years ago

sylvio-ruiz commented 2 years ago

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