Both Android and iOS can start emulators, but the program will not start
Description
Both Android and iOS can start emulators, but the program will not start
/Users/xuzhibin/.nvm/versions/node/v22.15.0/bin/node /Users/xuzhibin/Desktop/Project/bbhxwlService/node_modules/@react-native-community/cli/build/bin.js run-ios
info A dev server is already running for this project on port 8081.
info Found Xcode project "bbhxwlService.xcodeproj"
info Found booted iPhone 16 Pro
info Building (using "xcodebuild -project bbhxwlService.xcodeproj -configuration Debug -scheme bbhxwlService -destination id=013E12F3-E26D-4039-8AB8-A9174A954617")
- Building the app.
- Building the app.....
- Building the app......
- Building the app...
- Building the app....
- Building the app....
- Building the app.......
- Building the app........
- Building the app.........
- Building the app
- Building the app.........
- Building the app..
- Building the app.....
- Building the app......
- Building the app.
- Building the app..
- Building the app.....
- Building the app.....
- Building the app....
- Building the app.....
- Building the app......
- Building the app.....
- Building the app......
- Building the app.......
- Building the app......
- Building the app.......
- Building the app.
- Building the app..
- Building the app.........
- Building the app
- Building the app..
- Building the app......
- Building the app
- Building the app......
- Building the app.....
- Building the app........
- Building the app.....
- Building the app...
info 💡 Tip: Make sure that you have set up your development environment correctly, by running npx react-native doctor. To read more about doctor command visit: https://github.com/react-native-community/cli/blob/main/packages/cli-doctor/README.md#doctor
error Unable to open base configuration reference file '/Users/xuzhibin/Desktop/Project/bbhxwlService/ios/Pods/Target Support Files/Pods-bbhxwlService/Pods-bbhxwlService.debug.xcconfig'. (in target 'bbhxwlService' from project 'bbhxwlService')
error Unable to load contents of file list: '/Target Support Files/Pods-bbhxwlService/Pods-bbhxwlService-frameworks-Debug-input-files.xcfilelist' (in target 'bbhxwlService' from project 'bbhxwlService')
error Unable to load contents of file list: '/Target Support Files/Pods-bbhxwlService/Pods-bbhxwlService-frameworks-Debug-output-files.xcfilelist' (in target 'bbhxwlService' from project 'bbhxwlService')
error Unable to load contents of file list: '/Target Support Files/Pods-bbhxwlService/Pods-bbhxwlService-resources-Debug-input-files.xcfilelist' (in target 'bbhxwlService' from project 'bbhxwlService')
error Unable to load contents of file list: '/Target Support Files/Pods-bbhxwlService/Pods-bbhxwlService-resources-Debug-output-files.xcfilelist' (in target 'bbhxwlService' from project 'bbhxwlService')
error Failed to build ios project. "xcodebuild" exited with error code '65'. To debug build logs further, consider building your app with Xcode.app, by opening 'bbhxwlService.xcodeproj'.
Android also failed
info A dev server is already running for this project on port 8081.
info Launching emulator...
info Successfully launched emulator.
info Installing the app...
Starting a Gradle Daemon (subsequent builds will be faster)
> Task :gradle-plugin:settings-plugin:checkKotlinGradlePluginConfigurationErrors SKIPPED
> Task :gradle-plugin:shared:checkKotlinGradlePluginConfigurationErrors SKIPPED
> Task :gradle-plugin:shared:compileKotlin UP-TO-DATE
> Task :gradle-plugin:shared:compileJava NO-SOURCE
> Task :gradle-plugin:shared:processResources NO-SOURCE
> Task :gradle-plugin:shared:classes UP-TO-DATE
> Task :gradle-plugin:shared:jar UP-TO-DATE
> Task :gradle-plugin:settings-plugin:compileKotlin UP-TO-DATE
> Task :gradle-plugin:settings-plugin:compileJava NO-SOURCE
> Task :gradle-plugin:settings-plugin:pluginDescriptors UP-TO-DATE
> Task :gradle-plugin:settings-plugin:processResources UP-TO-DATE
> Task :gradle-plugin:settings-plugin:classes UP-TO-DATE
> Task :gradle-plugin:settings-plugin:jar UP-TO-DATE
> Task :gradle-plugin:react-native-gradle-plugin:checkKotlinGradlePluginConfigurationErrors SKIPPED
> Task :gradle-plugin:react-native-gradle-plugin:compileKotlin UP-TO-DATE
> Task :gradle-plugin:react-native-gradle-plugin:compileJava NO-SOURCE
> Task :gradle-plugin:react-native-gradle-plugin:pluginDescriptors UP-TO-DATE
> Task :gradle-plugin:react-native-gradle-plugin:processResources UP-TO-DATE
> Task :gradle-plugin:react-native-gradle-plugin:classes UP-TO-DATE
> Task :gradle-plugin:react-native-gradle-plugin:jar UP-TO-DATE
[Incubating] Problems report is available at: file:///Users/xuzhibin/Desktop/Project/bbhxwlService/android/build/reports/problems/problems-report.html
Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0.
You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins.
For more on this, please refer to https://docs.gradle.org/8.13/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation.
10 actionable tasks: 10 up-to-date
info 💡 Tip: Make sure that you have set up your development environment correctly, by running npx react-native doctor. To read more about doctor command visit: https://github.com/react-native-community/cli/blob/main/packages/cli-doctor/README.md#doctor
FAILURE: Build failed with an exception.
* Where:
Build file '/Users/xuzhibin/Desktop/Project/bbhxwlService/android/app/build.gradle' line: 1
* What went wrong:
A problem occurred evaluating project ':app'.
> Failed to apply plugin 'com.android.internal.application'.
> Android Gradle plugin requires Java 17 to run. You are currently using Java 16.
Your current JDK is located in /Users/xuzhibin/Library/Java/JavaVirtualMachines/openjdk-16.0.1/Contents/Home
You can try some of the following options:
- changing the IDE settings.
- changing the JAVA_HOME environment variable.
- changing `org.gradle.java.home` in `gradle.properties`.
* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.
> Get more help at https://help.gradle.org.
BUILD FAILED in 31s
info Run CLI with --verbose flag for more details.
error Failed to install the app. Looks like your Android environment is not properly set. Please go to https://reactnative.dev/docs/0.79/environment-setup?os=macos&platform=android&guide=native#jdk-studio and follow the React Native CLI QuickStart guide to install the compatible version of JDK.
Steps to reproduce
Failed to start emulator
React Native Version
0.79.2
Output of npx @react-native-community/cli info
info Fetching system and libraries information...
System:
OS: macOS 15.5
CPU: (8) arm64 Apple M1
Memory: 182.19 MB / 16.00 GB
Shell:
version: "5.9"
path: /bin/zsh
Binaries:
Node:
version: 22.15.0
path: ~/.nvm/versions/node/v22.15.0/bin/node
Yarn:
version: 1.22.19
path: /opt/homebrew/bin/yarn
npm:
version: 10.9.2
path: ~/.nvm/versions/node/v22.15.0/bin/npm
Watchman:
version: 2025.05.19.00
path: /opt/homebrew/bin/watchman
Managers:
CocoaPods: Not Found
SDKs:
iOS SDK:
Platforms:
- DriverKit 24.4
- iOS 18.4
- macOS 15.4
- tvOS 18.4
- visionOS 2.4
- watchOS 11.4
Android SDK: Not Found
IDEs:
Android Studio: 2024.3 AI-243.25659.59.2432.13423653
Xcode:
version: 16.3/16E140
path: /usr/bin/xcodebuild
Languages:
Java:
version: 16.0.1
path: /usr/bin/javac
Ruby:
version: 2.6.10
path: /usr/bin/ruby
npmPackages:
"@react-native-community/cli":
installed: 18.0.0
wanted: 18.0.0
react:
installed: 19.0.0
wanted: 19.0.0
react-native:
installed: 0.79.2
wanted: 0.79.2
react-native-macos: Not Found
npmGlobalPackages:
"*react-native*": Not Found
Android:
hermesEnabled: true
newArchEnabled: true
iOS:
hermesEnabled: Not found
newArchEnabled: false
Screenshots and Videos
No response
[!WARNING] Missing reproducer: We could not detect a reproducible example in your issue report. Reproducers are mandatory and we can accept only one of those as a valid reproducer:
- For majority of bugs: send us a Pull Request with the RNTesterPlayground.js edited to reproduce your bug.
- If your bug is UI related: a Snack
- If your bug is build/upgrade related: a project using our Reproducer Template
You can read more about about it on our website: How to report a bug.
I was prompted to install cocopods because the dependency version is too low to install. Then I used brew install cocopods to install it, but I still couldn't run it. Although there were errors detected in Android below, it can still run. I have fixed the Android issue.
✓ Node.js - Required to execute JavaScript code
✓ npm - Required to install NPM dependencies
✓ Watchman - Used for watching changes in the filesystem when in development mode
✓ Metro - Required for bundling the JavaScript code
Android
✖ Adb - No devices and/or emulators connected. Please create emulator with Android Studio or connect Android device.
✓ JDK - Required to compile Java code
✓ Android Studio - Required for building and installing your app on Android
✓ ANDROID_HOME - Environment variable that points to your Android SDK installation
✓ Gradlew - Build tool required for Android builds
✖ Android SDK - Required for building and installing your app on Android
- Versions found: N/A
- Version supported: 35.0.0
iOS
✓ Xcode - Required for building and installing your app on iOS
✓ Ruby - Required for installing iOS dependencies
✓ CocoaPods - Required for installing iOS dependencies
✓ .xcode.env - File to customize Xcode environment
Errors: 2
Warnings: 0
Usage
› Press f to try to fix issues.
› Press e to try to fix errors.
› Press w to try to fix warnings.
› Press Enter to exit.
This looks like an issue with your enviroment setup and not with React native itself . For example you are using Java 16 but RN requires Java 17 .Also you dont have adb installed . Please follow http://reactnative.dev/docs/set-up-your-environment to properly set up your enviroment
This issue is stale because it has been open for 180 days with no activity. It will be closed in 7 days unless you comment on it or remove the "Stale" label.
This issue was closed because it has been stalled for 7 days with no activity.