Current behaviour
After yarn react-native run-android is run, the following error occurs:

Preview
index.js
import{AppRegistry}from'react-native';import{PaperProvider}from'react-native-paper';importAppfrom'./App';
....exportdefaultfunctionMain(){return(<PaperProvidertheme={appTheme}><App/></PaperProvider>);}AppRegistry.registerComponent(appName,()=>Main)App.js
import{View,StyleSheet,TouchableOpacity}from'react-native';import{Appbar,Text,useTheme}from'react-native-paper';
...
constcreateStyles=(theme)=>StyleSheet.create({container: {flex: 1,justifyContent: 'flex-start',backgroundColor: theme.colors.background,},});constApp=()=>{consttheme=useTheme();conststyles=createStyles(theme);const[klineData,setKlineData]=useState([]);
...
useEffect(()=>{constfetchKlineData=async()=>{try{constresponse=awaitapi.get('/lines',{});setKlineData(response);}catch(error){setError(error);}};fetchKlineData();},[]);consthandleTitlePress=()=>{};return(<Viewstyle={styles.container}><Appbar.Header><TouchableOpacityonPress={handleTitlePress}><Appbar.Contenttitle={tradingPair}/></TouchableOpacity></Appbar.Header><Textstyle={{color: theme.colors.primary}}>show data</Text></View>);};exportdefaultAppMy attempt
I tried changing the <Appbar.Content title={tradingPair} /> in app.js to the following:
<Appbar.Content title={tradingPair} titleVariant="'titleMedium'" />
But the error still exists
Environment
| software | version |
|---|
| OS | windows 11 |
| ios | x |
| android | 9 |
| react-native | 0.76.5 |
| react-native-paper | ^5.12.5 |
| node | v18.20.5 |
| yarn | 1.22.22 |
| expo sdk | x. |
Current behaviour
After yarn react-native run-android is run, the following error occurs:

Preview
index.js
App.js
My attempt
I tried changing the <Appbar.Content title={tradingPair} /> in app.js to the following:
<Appbar.Content title={tradingPair} titleVariant="'titleMedium'" />
But the error still exists
Environment