猿问

React Native,为什么 react-native run-android 不工作?

我正在尝试运行命令react-native run-android,但它抛出错误。我正在关注我遵循的每一步的文档,但它不起作用,我认为它没有选择路径,但它设置为 doc 中所示。谁能告诉我怎么了?


info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.

(node:12536) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency

(Use `node --trace-warnings ...` to show where the warning was created)

Jetifier found 967 file(s) to forward-jetify. Using 4 workers...

info Starting JS server...

'C:\Users\Danger' is not recognized as an internal or external command,

operable program or batch file.

info Launching emulator...

'C:\Users\Danger' is not recognized as an internal or external command,

operable program or batch file.

'C:\Users\Danger' is not recognized as an internal or external command,

operable program or batch file.

'C:\Users\Danger' is not recognized as an internal or external command,

operable program or batch file.

'C:\Users\Danger' is not recognized as an internal or external command,

operable program or batch file.

'C:\Users\Danger' is not recognized as an internal or external command,

operable program or batch file.

'C:\Users\Danger' is not recognized as an internal or external command,

operable program or batch file.

'C:\Users\Danger' is not recognized as an internal or external command,

operable program or batch file.

'C:\Users\Danger' is not recognized as an internal or external command,

operable program or batch file.

'C:\Users\Danger' is not recognized as an internal or external command,

operable program or batch file.

'C:\Users\Danger' is not recognized as an internal or external command,

operable program or batch file.

'C:\Users\Danger' is not recognized as an internal or external command,

operable program or batch file.

'C:\Users\Danger' is not recognized as an internal or external command,

operable program or batch file.

这是我在 android 中运行 react native 后得到的错误


潇潇雨雨
浏览 184回答 2
2回答

摇曳的蔷薇

做这些。确保 JDK 版本为 8 或更新版本。确保正确设置了 android 路径。删除 android/build 和 android/app/build 文件夹。编辑:如果 JDK 版本是 14并且 gradle 版本低于 6.3您必须将 JDK 降级到 11 或将 gradle 升级到 6.3 以上

慕勒3428872

你有 RN 启动模拟器时遇到问题。所以你可能需要自己启动它,或者连接真实设备
随时随地看视频慕课网APP

相关分类

JavaScript
我要回答