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

启动React Native安卓应用时遇Error calling AppRegistery.runApplication错误求助

Troubleshooting React Native Android Connection Error

Hey there! Let’s work through this frustrating React Native Android issue you’re dealing with. You’ve already tried some common fixes—restarting the packager, reconnecting your device/simulator, and running adb reverse tcp:8081 tcp:8081—so here are some additional steps to try:

  • Double-check the packager is running properly
    Sometimes a "restart" doesn’t fully spin up the packager. Navigate to your project root in terminal, run npm start (or yarn start if you use Yarn), and wait until you see the message "Loading dependency graph, done." before reloading your app.

  • Disable firewall/antivirus temporarily
    Local firewalls or antivirus tools often block the 8081 port that React Native uses. Try turning them off briefly, or add an exception for port 8081, then test the app again.

  • Clear all caches
    Corrupted cache can cause weird connection issues:

    • Reset React Native’s cache: Run npx react-native start --reset-cache
    • Clean Android build cache: Navigate to the android folder with cd android, then run ./gradlew clean. Head back to your project root and rebuild the app afterward.
  • Verify network setup (for physical devices)
    Make sure your phone and computer are on the same WiFi network. Then shake your device to open the developer menu, select "Change Bundle Location", and enter your computer’s local IP address followed by :8081 (e.g., 192.168.0.105:8081). You can find your IP with ipconfig (Windows) or ifconfig (Mac/Linux).

  • Reinstall dependencies
    Damaged node modules might be the culprit. Delete your node_modules folder, then run npm install (or yarn install) to reinstall everything. Restart the packager and app once done.

  • Target the correct device with adb
    If you have multiple devices/simulators connected, run adb devices to list them, then specify the device ID when running the reverse command: adb -s <your-device-id> reverse tcp:8081 tcp:8081.

If none of these steps resolve the issue, sharing more details like your React Native version, Android SDK version, or the full error log from the terminal would help narrow things down further!

内容的提问来源于stack exchange,提问作者Corrupt

相关产品推荐
方舟 Agent Plan

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

最近更新时间:2026.05.29 08:10:33