Hi,
I am using the latest Expo Android client as of 22-12-2022 (version 2.23.2), the app crashes when I add ImageBackground tag. This is true for both when testing on my own phone and on the Appetize android emulator.
This code crashes:
import * as React from 'react';
import { Text, View, StyleSheet, ImageBackground } from 'react-native';
import Constants from 'expo-constants';
// You can import from local files
import AssetExample from './components/AssetExample';
import Screen1 from './components/Page'
// or any pure javascript modules available in npm
import { Card } from 'react-native-paper';
export default function App() {
return (
<Screen />
);
}
const Screen = () => {
return(
<ImageBackground source={require('./assets/snack-icon.png')} resizeMode="cover" style={styles.image}>
<View style={styles.container} >
<Text style={styles.paragraph}>
Whook
</Text>
</View>
</ImageBackground>
)
}
This does not crash:
import * as React from 'react';
import { Text, View, StyleSheet, ImageBackground } from 'react-native';
import Constants from 'expo-constants';
// You can import from local files
import AssetExample from './components/AssetExample';
import Screen1 from './components/Page'
// or any pure javascript modules available in npm
import { Card } from 'react-native-paper';
export default function App() {
return (
<Screen />
);
}
const Screen = () => {
return(
<View style={styles.container} >
<Text style={styles.paragraph}>
Whook
</Text>
</View>
)
}