Appium 启动 start session 的时候提示 Error executing adbExec

今天换个app,启动session时,竟然报错了,之前的app都能正常启动的,报错如下:(报错中的***是app命令 做了打码处理)

An unknown server-side error occurred while processing the command. Original error: Cannot start the 'com.*****.*****' application. Visit https://github.com/appium/appium/blob/master/docs/en/writing-running-appium/android/activity-startup.md for troubleshooting. Original error: Error executing adbExec. 
Original error: 'Command 'D:\\Test_Tools\\auto_test\\app\\adt-bundle-windows-x86-20130917\\sdk\\platform-tools\\adb.exe -P 5037 -s 3520541a shell am start -W -n com.*****.*****/com.*****.******.ui.activity.MainActivity -S' exited with code 1'; 
Stderr: 'java.lang.SecurityException: Permission Denial: starting Intent { flg=0x10000000 cmp=com.*****.*****/.ui.activity.MainActivity } from null (pid=13486, uid=2000) not exported from uid 10552

 

解决办法是 原来是appActivity 写错了,启动不了app。后来换了一下appActivity,session启动成功了。

 二、同时 如何启动appActivity  可以用这个命令,绝对好用:

首先打开要测试的App,然后在cmd里运行  adb shell dumpsys window windows

cmd里最后一行 就是我们要的appActivity,    .ui.activity.SplashActivity 如图:

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值