macacajs / NoSmoke

A cross platform UI crawler which scans view trees then generate and execute UI test cases.
https://macacajs.github.io/NoSmoke
MIT License
199 stars 58 forks source link

android启动测试报错 #88

Closed wishchen closed 4 years ago

wishchen commented 4 years ago

环境:Mac macaca版本 2.2.0, nosmoke版本 2.0.5 server报错内容:

>> helper.js:207:14 [master] pid:73382 Using local app form /Users/****/.macaca-temp/huobi-0-52ebcb13.apk
>> checking permissionPatterns: []
>> uiautomator-client.js:38:12 [master] pid:73382 Package com.macaca.android.testing is not exists,execute intsall action.
>> uiautomator-client.js:42:14 [master] pid:73382 /usr/local/lib/node_modules/macaca-android/node_modules/uiautomatorwd/app/build/outputs/apk/debug/app-debug.apk not found, please resolve and reinstall android driver
>> responseHandler.js:56:12 [master] pid:73382 Send Error Respone to Client: Error: >> uiautomator-client.js:42:14 [master] pid:73382 /usr/local/lib/node_modules/macaca-android/node_modules/uiautomatorwd/app/build/outputs/apk/debug/app-debug.apk not found, please resolve and reinstall android driver
macaca-bot commented 4 years ago

This is the translated issue:


android Start the test error

Content server error:

`

helper.js: 207: 14 [master] pid: 73382 Using local app form /Users/****/.macaca-temp/huobi-0-52ebcb13.apk checking permissionPatterns: [] uiautomator-client.js: 38: 12 [master] pid: 73382 Package com.macaca.android.testing is not exists, execute intsall action. uiautomator-client.js: 42: 14 [master] pid: 73382 /usr/local/lib/node_modules/macaca-android/node_modules/uiautomatorwd/app/build/outputs/apk/debug/app-debug.apk not found, please resolve and reinstall android driver responseHandler.js: 56: 12 [master] pid: 73382 Send Error Respone to Client: Error: >> uiautomator-client.js: 42: 14 [master] pid: 73382 / usr / local / lib / node_modules / macaca -android / node_modules / uiautomatorwd / app / build / outputs / apk / debug / app-debug.apk not found, please resolve and reinstall android driver `

wishchen commented 4 years ago

已解决,原因是gradle版本过低,需要大于5.4.7以上的gradle版本编译生成apk. 先卸载

npm uninstall macaca-android -g
npm uninstall app-inspector -g
npm cache clean

升级gradle版本 再重新安装 npm i macaca-android -g

macaca-bot commented 4 years ago

This is the translated issue comment: @wishchen


Has been resolved, because gradle version is too low, it requires more than the above version 5.4.7 gradle compiled apk. Uninstall ` npm uninstall macaca-android -g npm uninstall app-inspector -g npm cache clean Upgrade version gradle Re-install Npm i macaca-android -g`