So this might be a bit of an edge case, but I'm using visual studio on a VM, and I have my phone in my hand. I'd like to set things up that when I press "play" in visual studio, it compiles my cordova app, and pushes it to my phone next to me, so I can test and debug etc.
My phone is 'rooted' and I have installed ADB wifi. I am able to connect to it from Visual Studio's adb version and also adb devices lists it.
(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 press Play in Visual Studio it compiles and gets to the point where it needs to deploy to the phone and then it comes up with the following error: The system cannot find the file specified
(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 ==========
I had a similar issue and this worked for me...
adb kill-server
adb tcpip 5555
adb connect 10.10.10.6
adb devices
- should show your device
Open Visual Studio as Admin
Type: ALT+B, R (ALT+B then R) to rebuild your solution
Run your app
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With