我正在使用react-native版本0.69,我想读取存储在我的react native项目中的资产中的文件。在中使用以下语法App.js
import fs from 'react-native-fs';
我已经安装了“react-native-fs”并按照我在互联网上找到的所有链接进行操作,但在运行应用程序时仍然遇到以下错误。
ERROR TypeError: null is not an object (evaluating 'RNFSManager.RNFSFileTypeRegular')
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.
Run Code Online (Sandbox Code Playgroud)
我尝试运行,react-native link react-nativs-fs但如官方文档中所述,react-native >= 60 中的链接支持已被删除,我无法使其正常工作,任何帮助将不胜感激。我在 stackoverflow 上看到了类似的问题,但没有人给出 React …