Using PHONEGAP to develop a mobile app, you often need to change the code after debugging, the use of the Android simulator is very slow to start each time, and does not guarantee the final effect on the real machine. So the general use of the real machine for debugging.
Set up the debugging environment of the real machine here will not repeat, there are many online tutorials. Here is the main talk about my Nodejs command line mode run when the error problem, when the input Cordova run Android, the final app is not installed on the phone, viewing the error message, shown as follows:
According to the error message to judge, should be Adb.exe did not start up, so found Adb.exe double-click Start, again back to run found still this error, finally found that a program occupies the default port of ADB,
At the command line, enter:
Netstat-aon|findstr "5037" find adb default port 5037 who is listening
Shown below:
Keep looking for 31124, enter
Tasklist|findstr "31124"
Show
The original is 360 mobile phone assistant occupy this port, so close this program or kill it directly in the Task Manager, Cordova run Android
, the problem is solved.
Workaround for Cordova command line unable to start Adb.exe under Windows environment