0

I'm encountering an "Asset not found" error in my React Native project using Expo CLI specifically for the Android platform. The error message mentions a missing asset file, "Puls%20Button.png," at a specified path. I've verified the file path and confirmed that the asset file exists in the correct location. However, the error still persists. Here are the details of my project configuration:

package.json configuration:

{
  "name": "rough",
  "version": "1.0.0",
  "main": "node_modules/expo/AppEntry.js",
  "scripts": {
    "start": "expo start",
    "android": "expo start --android",
    "ios": "expo start --ios",
    "web": "expo start --web"
  },
  "dependencies": {
    "expo": "~48.0.18",
    "expo-status-bar": "~1.4.4",
    "react": "18.2.0",
    "react-native": "0.71.8"
  },
  "devDependencies": {
    "@babel/core": "^7.20.0"
  },
  "private": true
}

I've tried restarting the development server, clearing the cache, and ensuring the correct asset reference in my code. However, the error persists even with this specific package.json configuration. Are there any additional considerations or troubleshooting steps specific to this configuration that I should be aware of? Any insights or suggestions on how to resolve this "Asset not found" error in Expo CLI for the Android platform would be greatly appreciated.

Thank you!

Code:


import { StatusBar } from 'expo-status-bar';
import { StyleSheet, Text, View, Image } from 'react-native';
import latest from "./assets/latest/png-icons/bottom-nav-ecom/Puls Button.png";
import toffee from "./assets/toffeeshare/Aasabie Asset Files/PNG/cart progress/Frame 14.png";

export default function App() {
  return (
    <View style={styles.container}>
      <Image source={toffee} />
      <Text>Open up  working on your app!</Text>
    </View>
  );
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: '#fff',
    alignItems: 'center',
    justifyContent: 'center',
  },
});

0 Answers0