【问题标题】:Native module cannot be null - React Native, Expo本机模块不能为空 - React Native,Expo
【发布时间】:2020-05-07 01:32:38
【问题描述】:

我制作了 expo 初始应用程序 我的代码:

import React from 'react';
import { StyleSheet, Text, View } from 'react-native';
import NfcManager, {NfcEvents} from 'react-native-nfc-manager';
export default function App() {
  return (
    <View style={styles.container}>
      <Text>Open up App.js to start working on your app!</Text>
    </View>
  );
}
const styles = StyleSheet.create({
  container: {
    flex: 1,
    backgroundColor: '#fff',
    alignItems: 'center',
    justifyContent: 'center',
  },
});

当我尝试导入 NFC 管理器时出现错误:本机模块不能为空 screenshot

Google 说它的 IOS 通知错误,我从 windows VScode 编码并且无法链接推送通知,我该如何解决这个错误?我无法在没有博览会的情况下进行编码,因为据我所知,这只是从 iPhone 上的 Windows 模拟我的应用程序的一种方法

【问题讨论】:

    标签: react-native expo react-native-ios


    【解决方案1】:

    我解决了:expo 不允许额外的库

    【讨论】:

    • 请在答案中提供更多详细信息,说明这是如何解决您的问题的。
    猜你喜欢
    • 2020-04-30
    • 2021-11-04
    • 1970-01-01
    • 2020-12-13
    • 2021-08-09
    • 2020-03-12
    • 2018-09-18
    • 1970-01-01
    • 2018-02-12
    相关资源
    最近更新 更多