alibaba / macaca

Automation solution for multi-platform. 多端自动化解决方案
https://macacajs.github.io
MIT License
3.17k stars 419 forks source link

android: 2.1.0 [out-of-date] #973

Closed taozhixiang closed 4 years ago

taozhixiang commented 4 years ago

macaca-doctor version: 2.0.18 Node.js checklist: node env: C:\soft\node\node.exe
node version: v12.14.0 Android checklist: JAVA version is 1.8 JAVA_HOME is set to C:\Program Files\Java\jdk1.8.0_191
ANDROID_HOME is set to C:\Users\walkCreaker\AppData\Local\Android\Sdk Platforms is set to C:\Users\walkCreaker\AppData\Local\Android\Sdk\platforms\ android-29 ADB tool is set to C:\Users\walkCreaker\AppData\Local\Android\Sdk\platform-to ols\adb.exe GRADLE_HOME is set to C:\soft\gradle-6.3-all\gradle-6.3 Installed driver list: android: 2.1.0 [out-of-date]

运行 macaca doctor 的时候出现以下错误 android:2.1.0[out-of-date], 运行 npm run test:android 出现以下错误

Test completed! npm ERR! code ELIFECYCLE npm ERR! errno 2 npm ERR! sample-nodejs@1.0.0 test:native: macaca run --verbose -d ./macaca-test/mobile-app-sample.test.js npm ERR! Exit status 2 npm ERR! npm ERR! Failed at the sample-nodejs@1.0.0 test:native script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\walkCreaker\AppData\Roaming\npm-cache_logs\2020-04-26T05_39_00_930Z-debug.log npm ERR! code ELIFECYCLE npm ERR! errno 2 npm ERR! sample-nodejs@1.0.0 test:android: cross-env platform=android npm run test:native npm ERR! Exit status 2 npm ERR! npm ERR! Failed at the sample-nodejs@1.0.0 test:android script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! C:\Users\walkCreaker\AppData\Roaming\npm-cache_logs\2020-04-26T05_39_00_965Z-debug.log

macaca-bot commented 4 years ago

This is the translated issue:


android: 2.1.0 [out-of-date]

macaca-doctor version: 2.0.18 Node.js checklist: node env: C: \ soft \ node \ node.exe node version: v12.14.0 Android checklist: JAVA version is 1.8 JAVA_HOME is set toC: \ Program Files \ Java \ jdk1.8.0_191 ANDROID_HOME is set to C: \ U sers \ walkCreaker \ AppData \ Local \ Android \ Sdk Platforms is set to C: \ Users \ walkCreaker \ AppData \ Local \ Android \ Sdk \ platforms \ android-29 ADB tool is set toC: \ Users \ walkCreaker \ AppData \ Local \ Android \ Sdk \ platform-to ols \ adb.exe GRADLE_HOME is set to C: \ soft \ gradle-6.3-all \ gradle-6.3 Installed driver list: android: 2.1.0 [out- of-date]

Run macaca doctor when the following error  android: 2.1.0 [out-of-date], Run npm run test: android The following error occurred

Test completed! npm ERR! code ELIFECYCLE npm ERR! errno 2 npm ERR sample-nodejs@1.0.0 test:! native: macaca run --verbose -d / macaca-test / mobile-app-sample.test.js. npm ERR! Exit status 2 npm ERR! ! Npm ERR Failed at the sample-nodejs@1.0.0 test: native script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

! Npm ERR A complete log of this run can be found in: npm ERR C:! \ Users \ walkCreaker \ AppData \ Roaming \ npm-cache \ _logs \ 2020-04-26T05_39_00_930Z-debug.log npm ERR! code ELIFECYCLE npm ERR! errno 2 npm ERR sample-nodejs@1.0.0 test:! android: cross-env platform = android npm run test: native npm ERR! Exit status 2 npm ERR! ! Npm ERR Failed at the sample-nodejs@1.0.0 test: android script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

! Npm ERR A complete log of this run can be found in: npm ERR C:! \ Users \ walkCreaker \ AppData \ Roaming \ npm-cache \ _logs \ 2020-04-26T05_39_00_965Z-debug.log

houseshi commented 4 years ago
  1. 升级gradle版本 ,我这边使用了6.2.2
  2. 重新安装macaca-andorid (cnpm macaca-android -g)。 unlock-apk 这一步可能会有错误,如果你之前已经有环境,则没有太大影响,这是因为部分依赖更新没有同步导致的。
  3. 安装完毕后 再次使用macaca doctor检查
  4. 尝试运行用例,通过。

出现的错误如下:

image 重新安装

image 重新检查

image

运行一条测试

image

macaca-bot commented 4 years ago

This is the translated issue comment: @houseshi


  1. Upgrade gradle version and I am using 6.2.2
  2. Replace the macaca-andorid (cnpm macaca-android -g). unlock-apk This step may be wrong, if you already have before you the environment is not much affected, because it is partially dependent updates are not synchronized due. Use macaca doctor check again 3. After installation is complete

Errors are as follows:

! [Image] (https://user-images.githubusercontent.com/50022460/80300366-b3eeb600-87ce-11ea-82cc-9f136e6e8c57.png) re-install

! [Image] (https://user-images.githubusercontent.com/50022460/80300384-cb2da380-87ce-11ea-98cc-465ead4dd328.png) check again

! [Image] (https://user-images.githubusercontent.com/50022460/80300389-d84a9280-87ce-11ea-9c80-335be20f7bcb.png)

niaoshuai commented 4 years ago

@taozhixiang now is ok today update android package

cnpm i macaca-android -g