错误信息如下
os:鸿蒙
app:鸿蒙混合包
代码
d.app_start(‘com.xxx.app.xxx’)
File "C:\Users\xxx\IdeaProjects\xxx\xxx\uiClimber\webservice\test.py", line 385, in uiautomator2
c.app_start('com.xxx.app.xxx')
File "C:\Users\xxx\AppData\Local\Programs\Python\Python39\lib\site-packages\uiautomator2\__init__.py", line 1406, in app_start
info = self.app_info(package_name)
File "C:\Users\xxx\AppData\Local\Programs\Python\Python39\lib\site-packages\uiautomator2\__init__.py", line 1550, in app_info
raise BaseError(resp.get('description', 'unknown'))
uiautomator2.exceptions.BaseError: stat /data/app/com.xxx.app.mall-lIiErRZl8-Hosor1AWYCVw==/base.apk
package:/data/app/com.xxx.app.mall-lIiErRZl8-Hosor1AWYCVw==/split_activityfeature.apk
package:/data/app/com.xxx.app.mall-lIiErRZl8-Hosor1AWYCVw==/split_couponcenterfeature.apk
package:/data/app/com.xxx.app.mall-lIiErRZl8-Hosor1AWYCVw==/split_ijkplayer.apk
package:/data/app/com.xxx.app.mall-lIiErRZl8-Hosor1AWYCVw==/split_jdlive.apk
package:/data/app/com.xxx.app.mall-lIiErRZl8-Hosor1AWYCVw==/split_liveservicefeature.apk
package:/data/app/com.xxx.app.mall-lIiErRZl8-Hosor1AWYCVw==/split_orderfeature.apk
package:/data/app/com.xxx.app.mall-lIiErRZl8-Hosor1AWYCVw==/split_paymentfeature.apk
package:/data/app/com.xxx.app.mall-lIiErRZl8-Hosor1AWYCVw==/split_productdetailfeafure.apk
package:/data/app/com.xxx.app.mall-lIiErRZl8-Hosor1AWYCVw==/split_searchfeature.apk: no such file or direct
解决办法,添加activity参数
d.app_start(‘com.xxx.app.xxx’,‘.main.xxxActivity’)
或者
d.app_start(‘com.xxx.app.xxx’,use_monkey=True)
本文介绍在使用鸿蒙混合包的uiautomator2库时遇到的app_start错误,提供了解决方案,包括添加activity参数和use_monkey选项。重点在于处理com.xxx.app.mall的多分包问题。
1884

被折叠的 条评论
为什么被折叠?



