我在Windows 10中安装了Android Studio 3.0.1,事实证明,我无法启动任何模拟器,就像创建这些模拟器一样,这些模拟器不会显示,并且出现以下错误:adb: CreateFileW 'nul' failed: 系统找不到指定的文件,* daemon not running; starting now at tcp:5037

 * daemon not running; starting now at tcp:5037 
 * failed to start daemon 22:38 error: cannot connect to daemon 
 'C:\Users\Username\AppData\Local\Android\Sdk\platform-tools\adb.exe start-server' failed -- run manually if necessary

每次都需要在cmd控制台里 adb nodaemon server 才能正常启动adb,后来便往WINDOWS启动程序添加了.bat文件,进行开机自动运行cmd启动ADB并且自动再后台运行。


操作如下:1、桌面建立.bat文件
adb: CreateFileW 'nul' failed: 系统找不到指定的文件,* daemon not running; starting now at tcp:5037
 桌面->文本文档->保存为自定义(英文)命名的.bat格式,编辑.bat文件。添加几行代码
@echo off 
if "%1"=="hide" goto CmdBegin
start mshta vbscript:createobject("wscript.shell").run("""%~0"" hide",0)(window.close)&&exit
:CmdBegin
adb nodaemon server
 
 2.放置在win10启动目录,一般为C:\Users\Administrator\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup。这里要注意的是,这里的目录一般是隐藏掉的,在进入Administrator文件夹下设置显示
adb: CreateFileW 'nul' failed: 系统找不到指定的文件,* daemon not running; starting now at tcp:5037
3.开机重启adb程序就可以在后台运行了
adb: CreateFileW 'nul' failed: 系统找不到指定的文件,* daemon not running; starting now at tcp:5037

相关文章:

  • 2021-10-20
  • 2022-02-14
  • 2021-04-29
  • 2021-09-29
  • 2021-10-24
  • 2022-12-23
  • 2022-02-13
  • 2021-11-17
猜你喜欢
  • 2021-08-29
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-04-10
  • 2022-12-23
  • 2021-12-21
相关资源
相似解决方案