No apps connected even though both PC and device on same wifi and correct IP address. React Native
fix without usb
could not connect to the development server
how to connect debug apk to pc wirelessly
wireless debugging
No apps connected. Sending "reload" to all React Native apps failed. Make sure your app is running in the simulator or on a phone connected via USB.
here are steps
If you're encountering the error "No apps connected" even though both your devices are on the same Wi-Fi network and the app has the correct IP address, try these steps to solve it:
1. First, navigate to the Android directory and run `./gradlew clean`.
2. After that, run `npm start` or `yarn start` and see if the issue persists. Sometimes, cleaning the project can resolve the problem.
3. If the issue continues, attempt connecting using your mobile internet and tethering your PC to your mobile hotspot.
4. If you prefer not to use mobile internet, ensure that both your phone and PC are connected to the same Wi-Fi network.
Here's an alternative solution for wireless debugging without needing a USB cable:
1. Make sure your mobile's Developer Options are turned on.
2. In Developer Options, enable "Wireless Debugging" and navigate into it.
3. Click on "Pair Device with Pairing Code" on your mobile.
4. Now, on your PC terminal, type `adb pair (IP address shown on your mobile screen including port)` and press Enter. For example: `adb pair 192.168.0.165:38913`. Then, enter the pairing code displayed on your mobile screen (e.g., 245755) and press Enter.
5. Next, type `adb connect (enter IP address and port shown on top below device name)` and press Enter.
6. Once connected, type `adb reverse tcp:8081 tcp:8081` and press Enter.
7. Open your app, shake your mobile, click on "Change Bundle Location," and then click "OK" without changing anything.
If you're still facing issues:
1. Check for other connected devices by typing `adb devices` in the PC terminal. If there are multiple devices, disconnect them all
by using `adb disconnect (IP address of that device)` except the one with the IP address you paired earlier.
Congratulations! You've successfully set up wireless debugging.
From next time, you just need to enable wireless debugging and enter the reverse TCP IP command.
Feel free to share any other easy solutions you know, as it could be helpful for others.