android - React Native Simulation无法启动

标签 android reactjs react-native

我目前正在使用react native和react导航以及react native地图。在我从expo改为react native(使用本机代码)之后,在安装了react native映射和react导航的依赖项之后,我一直收到这个错误。这是我犯的错误。

warn The following packages to use the deprecated "rpm" config that will stop working from next release:

-反应本地地图:https://npmjs.com/package/react-native-maps
请通知他们的维修人员。您可以在https://github.com/react-native-community/cli/blob/master/docs/configuration.md#migration-guide找到更多详细信息。
INFO JS服务器已在运行。
安装应用程序的信息…
失败:生成失败,出现异常。
在哪里?
脚本'/users/blainefurman/documents/sample2/project/node_modules/@react native community/cli platform android/native_modules.gradle'行:195
出了什么问题:
评估设置“项目”时出现问题。
无法确定当前字符,它不是字符串、数字、数组或对象
当前读取的字符为“t”,int值为84
无法确定当前字符,它不是字符串、数字、数组或对象
行号1
索引号0
typeerror:无法读取属性''u text',该属性在sax parser.parser_text[as ontext](/users/blainefurman/documents/sample2/project/node_modules/xmldoc/lib/xmldoc.js:235:39)at emit(/users/blainefurman/documents/sample2/project/node_modules/xmldoc/node_modules/sax/lib/sax.js:639:35)在opentag的emitnode(/users/blainefurman/documents/sample2/project/node廑modules/xmldoc/node廑modules/sax/lib/sax.js:649:26)处关闭文本(/users/blainefurman/documents/sample2/project/node廑modules/xmldoc/node廑modules/sax/lib/sax.js:643:26)在saxparser.write(/users/blainefurman/documents/sample2/project/node廑modules/xmldoc/node廑modules/sax/lib/sax.js:839:5)上(/users/blainefurman/documents/sample2/project/node廑modules/xmldoc/node廑modules/sax/lib/sax.js:1289:15(/users/blainefurman/documents/sample2/project/node庘modules/xmldoc/lib/xmldoc.js:199:15)在readmanifest(/users/blainefurman/documents/sample2/project/node庘modules/@react native community/cli platform android/build/config/readmanifest.js:44:10)在object.projectconfig(/users/blainefurman/documents/sample2/project/node-modules/@react native community/cli platform android/build/config/index.js:60:46)位于object.get project[as project](/users/blainefurman/documents/sample2/project/node-modules/@react native community/cli/build/tools/config/index.js:129:61)
^
尝试:
使用--stack trace选项运行以获取堆栈跟踪。使用--info或--debug选项运行以获得更多日志输出。运行--扫描以获得完整的见解。
https://help.gradle.org获得更多帮助
1秒内生成失败
安装应用程序失败。确保您已经设置了android开发环境:https://facebook.github.io/react-native/docs/getting-started.html#android-development-environment。使用--verbose标志运行cli以获取更多详细信息。
错误:命令失败:./gradlew app:installdebug-preactnativedevserverport=8081
失败:生成失败,出现异常。
在哪里?
脚本'/users/blainefurman/documents/sample2/project/node_modules/@react native community/cli platform android/native_modules.gradle'行:195
出了什么问题:
评估设置“项目”时出现问题。
无法确定当前字符,它不是字符串、数字、数组或对象
当前读取的字符为“t”,int值为84
无法确定当前字符,它不是字符串、数字、数组或对象
行号1
索引号0
typeerror:无法读取属性''u text',该属性在sax parser.parser_text[as ontext](/users/blainefurman/documents/sample2/project/node_modules/xmldoc/lib/xmldoc.js:235:39)at emit(/users/blainefurman/documents/sample2/project/node_modules/xmldoc/node_modules/sax/lib/sax.js:639:35)在opentag的emitnode(/users/blainefurman/documents/sample2/project/node廑modules/xmldoc/node廑modules/sax/lib/sax.js:649:26)处关闭文本(/users/blainefurman/documents/sample2/project/node廑modules/xmldoc/node廑modules/sax/lib/sax.js:643:26)在saxparser.write(/users/blainefurman/documents/sample2/project/node廑modules/xmldoc/node廑modules/sax/lib/sax.js:839:5)上(/users/blainefurman/documents/sample2/project/node廑modules/xmldoc/node廑modules/sax/lib/sax.js:1289:15(/users/blainefurman/documents/sample2/project/node庘modules/xmldoc/lib/xmldoc.js:199:15)在readmanifest(/users/blainefurman/documents/sample2/project/node庘modules/@react native community/cli platform android/build/config/readmanifest.js:44:10)在object.projectconfig(/users/blainefurman/documents/sample2/project/node-modules/@react native community/cli platform android/build/config/index.js:60:46)位于object.get project[as project](/users/blainefurman/documents/sample2/project/node-modules/@react native community/cli/build/tools/config/index.js:129:61)
^
尝试:
使用--stack trace选项运行以获取堆栈跟踪。使用--info或--debug选项运行以获得更多日志输出。运行--扫描以获得完整的见解。
https://help.gradle.org获得更多帮助
1秒内生成失败
at checkExecSyncError (child_process.js:629:11)
at execFileSync (child_process.js:647:13)
at runOnAllDevices (/Users/blainefurman/Documents/sample2/project/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/runOnAllDevices.js:75:39)
at buildAndRun (/Users/blainefurman/Documents/sample2/project/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/index.js:137:41)
at then.result (/Users/blainefurman/Documents/sample2/project/node_modules/@react-native-community/cli-platform-android/build/commands/runAndroid/index.js:103:12)
at process._tickCallback (internal/process/next_tick.js:68:7)

我试图看到这是一个链接错误(但不是),我的所有依赖项,据我所知,都设置正确。
在这一点上我会采纳任何建议,因为我完全被难住了。
另外,很抱歉,第一次出现堆栈溢出(图片链接如下)。
click here for image

最佳答案

不确定这是否有用。我从未使用过expo和弹出,但您也遇到了类似的错误:https://github.com/nfarina/xmldoc/issues/19
能否尝试更新此包并重新运行:
https://github.com/nfarina/xmldoc

关于android - React Native Simulation无法启动,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56980617/

相关文章:

Android AlphaAnimation 导致黑框

android - 如何更改每次旋转的滑动刷新布局颜色?

javascript - Next Js Router beforePopState ,在 handler 中访问组件的状态

android - Android Corona sdk 的 Inapp Restore?

java - Android DataPickerDialog onDateChanged 未触发

reactjs - 将渲染 Prop 添加到功能性 React 子组件中

javascript - 外部 vendor 脚本(JS、Jquery)在 ReactJS 中渲染后不起作用

javascript - 尝试从 firebase 获取变量的快照给我一个错误

animation - 命令性地从 React Native 动画请求插值

javascript - 需要指定屏幕 react native tabnavigator