Connect Android App to Real Device using Android Studio over Wi-Fi – React Native

If we are using Android Studio, it is very simple to connect to Real Device.

First we need to enable “Developer Options” in our Phone. We need to follow the following steps to enable Developer Options.

  • Go to Settings ==> About Phone
  • Navigate to Software information or Build number.
  • Tap Build Number 7 times. (This will enable Developer Mode)
  • Now search for Developer options in settings.
  • it should be turned on
  • Now turn on Wireless debugging.
  • Now we need to pair out phone with Android Studo.
  • tap Wireless debugging and click on Pair device with QR code.
  • In Android Studio, open Device Manager and click on Wi-Fi icon to pair devices using Wi-Fi. It will open QR code.
  • Now From your mobile Scan that QR code to connect your device.
  • Finally your phone will show up as connected in Android Studio.

Now run the App directly over Wi-Fi, by using the following command.

Steps to run basic android app in MacBook .

STEP 1 : Install Android Studio

Android apps require Android Studio to run the app. We can download Android studio from here : https://developer.android.com/studio.

During installation, make sure to install Android SDK, Android Virtual Device (AVD) and Android Emulator. (accept all SDK licenses).

To add Android SDK to PATH, run the following command

After that add the following lines.

Now save it by using the following command

STEP 2 : Install Node.js (If it is not installed)

We can use Homebrew (Package manager for mac os) to install node. Run the following command in terminal to install Homebrew

After that run the following command

Now install Node.js using Homebrew using the following command

the above command will install node, npm and npx. We can check their versions with the following commands

STEP 3 : Install Java Development Kit (JDK)

React Native for Android needs Java Development Kit. We can install it using Homebrew. Run the following command to install JDK (java 17)

After installation, link it with the following command

Add JDK to shell command using the following command.

Now add these lines

Save it and Exit. after that run the following command to apply the changes.

Verify Java is setup correctly or not by using the following command

STEP 4 : Create a New React Native App :

Run the following command to create a new React Native App

Now navigate ‘SampleApp’ using the following command

Finally run the App using the following command