Closed yopichy closed 6 years ago
Hi there, I don't experience that one myself, but it looks to be an Expo and/or Native Base related issue.
Would you be able to look into those repos and let us know here, how you go?
I just clone from this repository, and following instruction in readme doc. My friend has same problem with me. I think the issue came from expo, but you say don't experience issue like that. So if you have no problem, I should not too.
Hey @yovierayz You're right, thanks for raising the issue. When debugging locally (compared to viewing the public Expo version) the error appears. I've just pushed some code which removes the Roboto_medium font reference and resolves.
Can you have a quick test and let us know?
This fixed it for me! Thanks!
Hi @mcnamee , the issues has been gone! Thanks :)
This worked for me .................
import React , { Component }from 'react'; import { Container, Header, Title, Content, Footer, FooterTab, Button, Left, Right, Body, Icon, Text, Root } from 'native-base'; import { Font , AppLoading} from 'expo';
export default class App extends React.Component {
constructor(props) { super(props); this.state = { loading: true }; }
async componentWillMount() { await Font.loadAsync({ Roboto: require("native-base/Fonts/Roboto.ttf"), Roboto_medium: require("native-base/Fonts/Roboto_medium.ttf") }); this.setState({ loading: false }); } render() { if (this.state.loading) { return (
);
}
return (
<Container>
<Header backgroundColor="#fff">
<Left>
<Button transparent>
<Icon name='menu' />
</Button>
</Left>
<Body>
<Title>Header</Title>
</Body>
<Right />
</Header>
<Content>
<Text>
This is Content Section
</Text>
</Content>
<Footer>
<FooterTab>
<Button full>
<Text>Footer</Text>
</Button>
</FooterTab>
</Footer>
</Container>
);
}
}
This is because of Text in native-base , try to use Text in react-native.
https://github.com/GeekyAnts/NativeBase/issues/1240
Here is a solution
I got a solution. It is work for me. https://qiita.com/yusuke1111/items/c9d11a2a6cc1cefae728
Here is a solution
After searching for tonnes of solutions , this worked for me , thank you
Hey, it's works for me. Just put a conditional if is loading and change to false when is done.
Based on achums007 commented on 24 Apr 2018,
I have problem when running on android, running well on ios and web. Is this normal or i missing something?
error message :
console.error: "fontFamily 'Roboto_medium' is not a system font and has not been loaded through Expo.Font.loadAsync.
If you intended to use a system font, make sure you typed the name correctly and that it is supported by your device operating system.
If this is a custom font, be sure to load it with Expo.Font.loadAsync." newConsoleFunc Logs.js:190:21 error YellowBox.js:69:16 processFontFamily Font.js:36:10 diffProperties ReactNativeFiber-dev.js:2939:112 addProperties ReactNativeFiber-dev.js:2950:30 addNestedProperty ReactNativeFiber-dev.js:2916:59 diffNestedProperty ReactNativeFiber-dev.js:2912:613 diffProperties ReactNativeFiber-dev.js:2941:91 addProperties ReactNativeFiber-dev.js:2950:30 create ReactNativeFiber-dev.js:2957:33 createInstance ReactNativeFiber-dev.js:3114:69 completeWork ReactNativeFiber-dev.js:1965:55 completeUnitOfWork ReactNativeFiber-dev.js:2548:76 performUnitOfWork ReactNativeFiber-dev.js:2571:56 workLoop ReactNativeFiber-dev.js:2595:141 _invokeGuardedCallback ReactNativeFiber-dev.js:75:23 invokeGuardedCallback ReactNativeFiber-dev.js:49:40 performWork ReactNativeFiber-dev.js:2634:41 scheduleUpdateImpl ReactNativeFiber-dev.js:2768:101 scheduleUpdate ReactNativeFiber-dev.js:2751:38 enqueueSetState ReactNativeFiber-dev.js:1569:90 setState react.development.js:237:31 handlePersistorState react.js:43:25 dispatch createStore.js:186:6 rehydrate persistStore.js:99:23