React Native - модуль RCTEventEmitter не является зарегистрированным вызываемым модулем (вызывая receiveTouches) - PullRequest
0 голосов
/ 21 июня 2019

Я запустил совершенно новый собственный реактивный проект, установил модуль react-native-firebase и все время получаю сообщение об ошибке Module RCTEventEmitter is not a registered callable module (calling receiveTouches)

Это происходит только тогда, когда я пытаюсь импортировать react-native-firebase в App.jsфайл.

Вот мой файл App.js, вызывающий проблему, я делаю что-то не так?

/**
 * Sample React Native App
 * https://github.com/facebook/react-native
 *
 * @format
 * @flow
 */

import React, {Component} from 'react';
import {Platform, StyleSheet, Text, View} from 'react-native';
import firebase from 'react-native-firebase';

const db = firebase.firestore();

const instructions = Platform.select({
  ios: 'Press Cmd+R to reload,\n' + 'Cmd+D or shake for dev menu',
  android:
    'Double tap R on your keyboard to reload,\n' +
    'Shake or press menu button for dev menu',
});

type Props = {};
export default class App extends Component<Props> {
  render() {
    return (
      <View style={styles.container}>
        <Text style={styles.welcome}>Welcome to React Native!</Text>
        <Text style={styles.instructions}>This is a fun app for fun people!</Text>
        <Text style={styles.instructions}>{instructions}</Text>
      </View>
    );
  }

  componentDidMount() {
    db.collection('test')
        .doc(1)
        .set({ name: "derp"}, { merge: true });
  }
}

const styles = StyleSheet.create({
  container: {
    flex: 1,
    justifyContent: 'center',
    alignItems: 'center',
    backgroundColor: '#F5FCFF',
  },
  welcome: {
    fontSize: 20,
    textAlign: 'center',
    margin: 10,
  },
  instructions: {
    textAlign: 'center',
    color: '#333333',
    marginBottom: 5,
  },
});

1 Ответ

0 голосов
/ 21 июня 2019

Я думаю, что что-то осталось сделать с проектом.В процессе строительства может быть что-то еще.

cd android
./gradlew clean
...