首页 > 其他分享 >adb命令启动报错Error: unknown command '-start'怎么办

adb命令启动报错Error: unknown command '-start'怎么办

时间:2023-03-20 22:34:26浏览次数:24  
标签:包名 shell 启动 unknown command start adb 报错 模拟器

大家好,每天记录小问题.水滴石穿.

今天介绍一个从0开始启动app应用的app命令

adb shell am -start -w -n 包名/启动名

第一次运行时报错

 

 怎么办呢,

这边使用的是雷电模拟器.已经连接的状态

先win+R输入cmd启动窗口

在输入adb shell 进入到这个窗口

 

 在模拟器上面启动你想启动的应用

接着输入:dumpsys activity | grep mFocusedActivity

 

 你就会看到你想要的包名和启动路径了

然后你可以关闭模拟器上面的应用了

在cmd窗口输入adb shell am start -W -n 包名/启动名

就启动好啦

注意事项

-start没有-

-w要大写-W

好了今天分享就到这里

 

   

标签:包名,shell,启动,unknown,command,start,adb,报错,模拟器
From: https://www.cnblogs.com/testzhi/p/17238183.html

相关文章