正在windows中运行react native run android,但出现以下错误:
info Running jetifier to migrate libraries to AndroidX. You can disable it using "--no-jetifier" flag.
(node:8484) 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 896 file(s) to forward-jetify. Using 4 workers...
info JS server already running.
info Installing the app...
'gradlew.bat' n'est pas reconnu en tant que commande interne
ou externe, un programme ex�cutable ou un fichier de commandes.
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: spawn gradlew.bat ENOENT
at notFoundError (C:\cygwin64\home\Abderrahmane\app\node_modules\cross-spawn\lib\enoent.js:6:26)
at verifyENOENT (C:\cygwin64\home\Abderrahmane\app\node_modules\cross-spawn\lib\enoent.js:40:16)
at ChildProcess.cp.emit (C:\cygwin64\home\Abderrahmane\app\node_modules\cross-spawn\lib\enoent.js:27:25)
at Process.ChildProcess._handle.onexit (internal/child_process.js:277:12)
info Run CLI with --verbose flag for more details.`
我已经安装了android studio并创建了一个项目,我还运行了emulator
create-react-native-app project
react-native init project
react-native start
react-native run-android
1条答案
按热度按时间q0qdq0h21#
您可以从react-native官方文档中尝试此react-native-environment设置,也可以从TutorialPoint one中尝试此react-native-environment设置