加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > Windows > 正文

windows – 如何说服Visual Studio在TCP / IP上使用ADB for andr

发布时间:2020-12-14 01:38:21 所属栏目:Windows 来源:网络整理
导读:所以这可能是一个边缘情况,但我在VM上使用visual studio,我手里拿着手机.我想说明当我在视觉工作室中按“播放”时,它会编译我的cordova应用程序,然后将它推到我旁边的手机上,这样我就可以测试和调试等等. 我的手机是’rooted’,我已经安装了ADB wifi.我可以
所以这可能是一个边缘情况,但我在VM上使用visual studio,我手里拿着手机.我想说明当我在视觉工作室中按“播放”时,它会编译我的cordova应用程序,然后将它推到我旁边的手机上,这样我就可以测试和调试等等.

我的手机是’rooted’,我已经安装了ADB wifi.我可以从Visual Studio的adb版本连接到它,adb设备也列出它.

(output from cmd.exe running as Admin in the solution folder)

 C:StuffCodesvnmyappMyApp>adb connect 10.10.10.6
 already connected to 10.10.10.6:5555

 C:StuffCodesvnmyappMyApp>adb devices
 List of devices attached
 10.10.10.6:5555 device

当我在Visual Studio中按Play时,它会编译并到达需要部署到手机的位置,然后它会出现以下错误:系统找不到指定的文件

(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 – 应该显示您的设备
>以管理员身份打开Visual Studio
>键入:ALT B,R(ALT B然后R)以重建您的解决方案
>运行你的应用程序

enter image description here

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读