赞
踩
解决通过appium的inspector功能无法启动app的原因
在打开appium-desktop程序,点击inspector功能,填写app的配置信息,启动服务提示如下:
报错信息:
An unknown server-side error occurred while processing the command. Original error: Cannot start the 'cc.knowyourself.kymeditation' 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 'E:\\android-sdk-windows\\platform-tools\\adb.exe -P 5037 -s HBSBB18821510293 shell am start -W -n cc.knowyourself.kymeditation/.business.home.HomeActivity -S -a android.intent.action.MAIN -c android.intent.category.LAUNCHER -f 0x10200000' exited with code 4294967295'; Stderr: 'Security exception: Permission Denial: starting Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=cc.knowyourself.kymeditation/.business.home.HomeActivity } from null (pid=14487, uid=2000) not exported from uid 10152 java.lang.SecurityException: Permission Denial: starting Intent { act=android.intent.action.MAIN cat=[android.intent.category.LAUNCHER] flg=0x10200000 cmp=cc.knowyourself.kymeditation/.business.home.HomeActivity } from null (pid=14487, uid=2000) not exported from uid 10152 at com.android.server.am.ActivityStackSupervisor.checkStartAnyActivityPermission(ActivityStackSupervisor.java:2028) at com.android.server.am.ActivityStarter.startActivity(ActivityStarter.java:931) at com.android.server.am.ActivityStarter.startActivity(ActivityStarter.java:656) at com.android.server.am.HwActivityStarter.startActivity(HwActivityStarter.java:235) at com.android.server.am.ActivityStarter.startActivityMayWait(ActivityStarter.java:1492) at com.android.server.am.HwActivityStarter.startActivityMayWait(HwActivityStarter.java:430) at com.android.server.am.ActivityStarter.execute(ActivityStarter.java:597) at com.android.server.am.ActivityManagerService.startActivityAndWait(ActivityManagerService.java:5911) at com.android.server.am.ActivityManagerShellCommand.runStartActivity(ActivityManagerShellCommand.java:474) at com.android.server.am.ActivityManagerShellCommand.onCommand(ActivityManagerShellCommand.java:161) at android.os.ShellCommand.exec(ShellCommand.java:103) at com.android.server.am.ActivityManagerService.onShellCommand(ActivityManagerService.java:17786) at android.os.Binder.shellCommand(Binder.java:642) at android.os.Binder.onTransact(Binder.java:540) at android.app.IActivityManager$Stub.onTransact(IActivityManager.java:3570) at com.android.server.am.ActivityManagerService.onTransact(ActivityManagerService.java:3654) at com.android.server.am.HwActivityManagerService.onTransact(HwActivityManagerService.java:609) at android.os.Binder.execTransact(Binder.java:739)'; Code: '4294967295'
出现这样的错误一定是因为当前的appActivity设置的不是app首次进入的appActivity
解决方法:
获取首次应用的活动名称可以通过 启动一次随机 monkey命令来获取
adb shell monkey -p 包名 -v -v -v 1
在把上图中的包名和activity名称复制下来,放到inspector的app配置信息中,再次启动即可
自动化测试相关教程推荐:
2023最新自动化测试自学教程新手小白26天入门最详细教程,目前已有300多人通过学习这套教程入职大厂!!_哔哩哔哩_bilibili
2023最新合集Python自动化测试开发框架【全栈/实战/教程】合集精华,学完年薪40W+_哔哩哔哩_bilibili
测试开发相关教程推荐
2023全网最牛,字节测试开发大佬现场教学,从零开始教你成为年薪百万的测试开发工程师_哔哩哔哩_bilibili
postman/jmeter/fiddler测试工具类教程推荐
讲的最详细JMeter接口测试/接口自动化测试项目实战合集教程,学jmeter接口测试一套教程就够了!!_哔哩哔哩_bilibili
2023自学fiddler抓包,请一定要看完【如何1天学会fiddler抓包】的全网最详细视频教程!!_哔哩哔哩_bilibili
2023全网封神,B站讲的最详细的Postman接口测试实战教学,小白都能学会_哔哩哔哩_bilibili
如果对你有帮助的话,点个赞收个藏,给作者一个鼓励。也方便你下次能够快速查找。
如有不懂还要咨询下方小卡片,博主也希望和志同道合的测试人员一起学习进步
在适当的年龄,选择适当的岗位,尽量去发挥好自己的优势。
我的自动化测试开发之路,一路走来都离不每个阶段的计划,因为自己喜欢规划和总结,
测试开发视频教程、学习笔记领取传送门!!
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。