React-Native Live Debugging and adb

adb.exe is the Android Debugger

Assuming you followed the last tutorial and all was well [ish], there is one further consideration and once again it all comes down to our enemy of versions !

The Android SDK and the adb

You should have two additions to your system with the Java SDK and Android

a. an environment var called JAVA_HOME - ...\Program Files\Java\sdk1.8...

b. in PATH - C:\Users\User-Name\AppData\Local\Android\sdk\platform-tools

Double check the above first; it’s the PATH that we are interested in.

Now, the adb.exe which is in the PATH may well have a higher version number, say 39, than the adb.exe of your Emulator, say 31 or 36.

Solution:

Rename the adb.exe in the \platform-tools to adb-current.exe or adb_1.0.39.exe [39 current right now] and copy/rename the xeplayer_adb.exe from your emulator to the ..\platform-tools\adb.exe so they are both of the same version.

The xeplayer_adb.exe for XE should be in C:\Program Files (x86)\XePlayer\bin and become the new adb.exe in \platform-tools.

Probably worth a system restart or kill off any running adb.exe.

Double Check:

Open XE Player and a command prompt and run

adb version

adb devices

Hopefully adb version will show 1.0.31 and the adb devices will list your XE player as 127.0.0.1:61001

Good to go with Live Updating.

Other emulators

Two popular alternatives over XE Player are NOX and MEMU; the latter runs Android 5 which might be of interest. I believe that NOX uses adb 1.0.36 so all of the above applies.

In summary just make sure that the adb.exe shipped with your emulator is the same one [version] as in ..Android\sdk\platform-tools.

If you do want to experiment with other emulators then that’s fine, but I would choose one and stick to it. These emulators install a fair bit of extras and they don’t always work very well together, so never mix your drinks. Personally XE Player and NOX look very [too] similar to me but that’s none of my business.

 

 

Leave a reply:

Your email address will not be published.

Site Footer