所以这可能有点边缘情况,但我在虚拟机上使用 Visual Studio,而且我手里拿着手机。我想进行设置,当我在 Visual Studio 中按“播放”时,它会编译我的 Cordova 应用程序,并将其推送到我旁边的手机上,以便我可以测试和调试等。
我的手机已“root”并且已安装 ADB wifi。我可以从 Visual Studio 的 adb 版本连接到它,并且 adb devices 也会列出它。
(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
当我在 Visual Studio 中按“播放”时,它会进行编译并到达需要部署到手机的位置,然后出现以下错误:该系统找不到指定的文件
(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 ==========
我有一个类似的问题,这对我有用......
adb kill-server
adb tcpip 5555
adb connect 10.10.10.6
adb devices
- 应该显示您的设备
Open Visual Studio as Admin
Type: ALT+B, R (ALT+B then R) to rebuild your solution
Run your app
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)