How to convince Visual Studio to use ADB for Android developer over TCP / IP

So it could be a bit case, but I use visual studio in a virtual machine and I have my phone in my hand. I would like to say that when I click β€œplay” in visual studio, it compiles my cordova application and pushes it to my phone next to me, so I can test and debug, etc.

My phone is rooted and I installed Wi-Fi ADB. I can connect to it from the adb version of Visual Studio, and adb devices list it too.

(output from cmd.exe running as Admin in the solution folder) C:\Stuff\Code\svn\myapp\MyApp>adb connect 10.10.10.6 already connected to 10.10.10.6:5555 C:\Stuff\Code\svn\myapp\MyApp>adb devices List of devices attached 10.10.10.6:5555 device 

When I click "Play" in Visual Studio, it compiles and gets to the place where he needs to deploy it on the phone, and then the following error appears: The system cannot find the file

 (output from "output" tab in visual studio) C:/Stuff/Code/svn/myapp/myApp/platforms/android/build/outputs /apk/android-debug.apk No scripts found for hook "after_build". No scripts found for hook "after_compile". ------ Copying back to project: android 2>------ Deploy started: Project: MyApp, Configuration: Debug Android ------ 2> Querying ADB for attached devices... 2>The system cannot find the file specified 2>The system cannot find the file specified ========== Build: 1 succeeded, 0 failed, 0 up-to-date, 0 skipped ========== ========== Deploy: 0 succeeded, 1 failed, 0 skipped ========== 
+5
source share
1 answer

I had a similar problem and it worked for me ...


  • adb kill-server

  • adb tcpip 5555

  • adb connect 10.10.10.6

  • adb devices - your device should be displayed

  • Open Visual Studio as Admin

  • Type: ALT+B, R (ALT+B then R) to rebuild your solution

  • Run your app

enter image description here

+4
source

Source: https://habr.com/ru/post/1266764/


All Articles