In my React Native project, I fetch data through an API and display it in the application. The data, including images, displays correctly in both the emulator and physical devices during development. However, when I generate a release APK and install it on devices, the images are not showing.
How can I resolve this issue and ensure that images fetched from the API display correctly in the release APK?
{services.map((service, serviceId) => (
<View key={serviceId}>
{service.products.map((product, productId) => (
<View key={productId} style={styles.FeatureCard}>
<Image
source={{uri: product.images.url}}
style={styles.imageCard}
/>
<View style={styles.textContainer}>
<Text style={styles.titleCard}>{product.title}</Text>
<View style={styles.priceContainer}>
<Text style={styles.price}>₹ {product.price}</Text>
<TouchableOpacity
style={[styles.customButton, getButtonColor(product)]}
onPress={() => handleAddToCart(product)}>
<Text style={styles.buttonText}>
{cartItems.some(item => item.id === product.id)
? 'Remove'
: 'Add'}
</Text>
</TouchableOpacity>
</View>
</View>
</View>
))}
</View>
))}