You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

React Native执行npx react-native start后Android Studio模拟器无响应问题

Fix: Android Emulator Not Responding After Running npx react-native start

Hey there, let's work through this issue together—it's one of the most common hiccups when getting started with React Native, so you're not alone! Here's a step-by-step breakdown of things to check:

  • First, verify your emulator is connected properly
    Make sure your Android Studio emulator is fully booted (you see the home screen). Pop open a terminal and run adb devices—you should see your emulator listed here. If it's missing, restart the adb server with:

    adb kill-server
    adb start-server
    

    Then check adb devices again to confirm it shows up.

  • Check if Metro is running without errors
    When you run npx react-native start, keep an eye on the terminal for any red error messages. A common culprit is a port conflict (default 8081 is often used by other apps). If you see a port error, start Metro on a different port:

    npx react-native start --port 8088
    

    Then, in your emulator, press Ctrl+M (Windows/Linux) or Cmd+M (Mac) to open the dev menu, select "Change Bundle Location", and enter http://localhost:8088/index.bundle before reloading.

  • Wipe cache and reinstall dependencies
    Sometimes stale cache or wonky dependencies cause this. Stop the Metro server first, then run these commands in order:

    npx react-native clean
    npm install
    npx react-native run-android
    

    Using run-android instead of just start ensures the app is properly compiled, installed, and connected to Metro automatically—this often fixes unresponsive emulator issues.

  • Test emulator network access to Metro
    Your emulator needs to reach the local Metro server. Open the emulator's browser and try loading http://localhost:8081/index.bundle (use your custom port if you changed it). If it fails, check the emulator's network settings—make sure no proxy is blocking local requests. You can also try toggling "Debug JS Remotely" in the dev menu to force a connection.

  • Double-check your environment setup
    Confirm your Android SDK/NDK versions match the requirements for your React Native version. Also, ensure ANDROID_HOME or ANDROID_SDK_ROOT environment variables are set correctly. If you're on an older React Native version, updating to the latest stable release might help:

    npm install react-native@latest
    

    (Just make sure to back up your project first to avoid compatibility surprises!)

If none of these steps work, share the exact error messages from your Metro terminal and the output of adb devices—that'll help narrow down the problem even more.

内容的提问来源于stack exchange,提问作者Onur Yüksekkaya

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.07 10:32:26