Error: Activity used to start app doesn’t exist or cannot ve launched!

来源:互联网 发布:mac需要清理软件吗 编辑:程序博客网 时间:2024/05/29 18:00

appium报错:

error: Failed to start an Appium session, err was: Error: Activity used to start app doesn't exist or cannot ve launched! Make usre it exists and is launchable activity

解决办法:
1.分析:包名错误
2.使用如下命令获取正确的包名:

(1).adb shell

(2).dumpsys activity | grep mFocusedActivity

3.结果如下:

mFocusedActivity: ActivityRecord{23fcaca u0 com.zui.calculator/.Calculator t438}

其中,“com.zui.calculator”为所需要的包名。

附录:

通过反编译也能获取到包名:

1.使用命令如下:

(1).adb install xxx.apk

(2).aapt dump badging xxx.apk

注:xxx.apk为待测apk完整路径。


本文参考链接:

1.大神:tpnet

http://blog.csdn.net/niubitianping/article/details/52624417

2.大神:zoraliu

http://www.cnblogs.com/zoraliu66/p/6530336.html

在此感谢大神们的分享!



阅读全文
0 0
原创粉丝点击