我最近尝试将我的React原生应用程序从expo 44更新到46,但它导致错误
这是我的App.js
import React from 'react';
import { Provider } from 'react-redux';
import { createStore, applyMiddleware } from 'redux';
import ReduxThunk from 'redux-thunk';
import reducers from './src/reducers';
import Router from './src/Router';
export default class App extends React.Component {
render() {
const store = createStore(reducers, {}, applyMiddleware(ReduxThunk));
return (
<Provider store={store}>
<Router />
</Provider>
);
}
}
我得到的错误是:
Invariant Violation: Tried to register two views with the same name RNGestureHandlerButton
ERROR Invariant Violation: "main" has not been registered. This can happen if:
* Metro (the local dev server) is run from the wrong folder. Check if Metro is running, stop it and restart it in the current project.
* A module failed to load due to an error and `AppRegistry.registerComponent` wasn't called.
请找到我的github link
1条答案
按热度按时间x4shl7ld1#
我相信世博会的文件对此并不清楚:不要安装react-native-gesture-handler,它已经存在于Expo中。
此外,你可以在github上检查错误,而不是直接发布问题:https://github.com/software-mansion/react-native-gesture-handler/issues/451