我是第一次做原生应用程序。我正确配置了所有的环境变量,安装了JDK 11,安装了Chocolatey,一切都正确,但是没有在模拟器或USB设备上运行。有人能帮我吗?
(node:23364) Warning: Accessing non-existent property 'padLevels' of module exports inside circular dependency
(Use `node --trace-warnings ...` to show where the warning was created)
info JS server already running.
'"adb"' n�o � reconhecido como um comando interno
ou externo, um programa oper�vel ou um arquivo em lotes.
info Launching emulator...
error Failed to launch emulator. Reason: No emulators found as an output of `emulator -list-avds`.
warn Please launch an emulator manually or connect a device. Otherwise app may fail to launch.
info Installing the app...
ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation.
error Failed to install the app. Make sure you have the Android development environment set up: https://reactnative.dev/docs/environment-setup.
Error: Command failed: gradlew.bat app:installDebug -PreactNativeDevServerPort=8081
at makeError (C:\Users\ana.tomaz\Downloads\AppVanzeiro\node_modules\execa\index.js:174:9)
at C:\Users\ana.tomaz\Downloads\AppVanzeiro\node_modules\execa\index.js:278:16
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async runOnAllDevices (C:\Users\ana.tomaz\Downloads\AppVanzeiro\node_modules\@react-native-community\cli-platform-android\build\commands\runAndroid\runOnAllDevices.js:109:5)
at async Command.handleAction (C:\Users\ana.tomaz\Downloads\AppVanzeiro\node_modules\@react-native-community\cli\build\index.js:142:9)
info Run CLI with --verbose flag for more details
1条答案
按热度按时间aiazj4mn1#
warn No apps connected. Sending "devMenu" to all React Native apps failed. Make sure your app is running in the simulator or on a phone connected via USB. info Opening developer menu... metro-file-map: Haste module naming collision: AppVanzeiro The following files share their name; please adjust your hasteImpl: * \package.json * \AppVanzeiro\package.json
Failed to construct transformer: DuplicateError: Duplicated files or mocks. Please check the console for more info at setModule (C:\Users\ana.tomaz\Downloads\AppVanzeiro\node_modules\metro-file-map\src\index.js:553:17) at workerReply (C:\Users\ana.tomaz\Downloads\AppVanzeiro\node_modules\metro-file-map\src\index.js:624:9) at process.processTicksAndRejections (node:internal/process/task_queues:95:5) at async Promise.all (index 17) at async C:\Users\ana.tomaz\Downloads\AppVanzeiro\node_modules\metro-file-map\src\index.js:395:22 at async DependencyGraph.ready (C:\Users\ana.tomaz\Downloads\AppVanzeiro\node_modules\metro\src\node-haste\DependencyGraph.js:94:5) at async Bundler.ready (C:\Users\ana.tomaz\Downloads\AppVanzeiro\node_modules\metro\src\Bundler.js:75:5) at async IncrementalBundler.ready (C:\Users\ana.tomaz\Downloads\AppVanzeiro\node_modules\metro\src\IncrementalBundler.js:327:5) at async Server.ready (C:\Users\ana.tomaz\Downloads\AppVanzeiro\node_modules\metro\src\Server.js:1247:5) { mockPath1: 'package.json', mockPath2: 'AppVanzeiro\package.json'