Macaca [公告] Macaca 驱动安装策略调整

达峰的夏天 · 2016年05月24日 · 最后由 always12 回复于 2016年11月30日 · 1650 次阅读

为提升使用体验,经开发组讨论,将自动安装驱动调整为手动安装。

原因

  • 更方便排查环境问题
  • 更方便独立驱动的升级
  • 细化更新粒度

如何更新

$ npm i macaca-cli -g

重新安装 cli 即可

然后使用 install 命令安装驱动,如需要使用 iOS 环境,可以通过如下命令安装:

$ macaca install ios

驱动对照表

官网可以看到目前支持的驱动列表,主要是用来查看目前本地使用的驱动是否最新。

可以通过 doctor 命令查看已经装载的驱动及其版本:

$ macaca doctor

链接

通过与最新驱动版本对比,可以知道是否应该升级驱动,如需升级只要重新安装即可。

共收到 7 条回复 时间 点赞

去耦合了?

#1 楼 @lihuazhang 一直不耦合,以前会自动安装依赖,升级操作很大动干戈

@xdf

win10 平台下 安装不了 android 和 ios 啊 求指点 以下是我机器环境相关和安装日志输出

C:\Users\cmd>macaca --registry http://registry.cnpmjs.org install chrome
http://registry.cnpmjs.org driver is not support yet

C:\Users\cmd>npm -v
3.8.7

C:\Users\cmd>node -v
v5.10.1

C:\Users\cmd>appium -v
1.5.3

C:\Users\cmd>macaca install android
macaca-android is installing for the first time with args: ["install","macaca-android","-—global","--registry=https://registry.npmjs.org/"]

/ loading...macaca-cli@1.0.36 D:\nodejs\node-global\node_modules\macaca-cli
`-- macaca-android@1.0.16 extraneous

npm WARN deprecated win-spawn@2.0.0: use cross-spawn or cross-spawn-async instead.
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "D:\nodejs\node.exe" "D:\nodejs\node_modules\npm\bin\npm-cli.js" "install" "macaca-android" "-—global" "--registry=https://registry.npmjs.org/"
npm ERR! node v5.10.1
npm ERR! npm v3.8.7
npm ERR! path D:\nodejs\node-global\node_modules\macaca-cli
npm ERR! code EBUSY
npm ERR! errno -4082
npm ERR! syscall rename

npm ERR! EBUSY: resource busy or locked, rename 'D:\nodejs\node-global\node_modules\macaca-cli' -> 'D:\nodejs\node-global\node_modules.macaca-cli.DELETE'
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! https://github.com/npm/npm/issues

npm ERR! Please include the following file with any support request:
npm ERR! D:\nodejs\node-global\node_modules\macaca-cli\npm-debug.log

npm install exited with code 4294963214 and signal null
install macaca-android failed with Error: npm WARN deprecated win-spawn@2.0.0: use cross-spawn or cross-spawn-async instead.
npm ERR! Windows_NT 10.0.10586
npm ERR! argv "D:\nodejs\node.exe" "D:\nodejs\node_modules\npm\bin\npm-cli.js" "install" "macaca-android" "-—global" "--registry=https://registry.npmjs.org/"
npm ERR! node v5.10.1
npm ERR! npm v3.8.7
npm ERR! path D:\nodejs\node-global\node_modules\macaca-cli
npm ERR! code EBUSY
npm ERR! errno -4082
npm ERR! syscall rename

npm ERR! EBUSY: resource busy or locked, rename 'D:\nodejs\node-global\node_modules\macaca-cli' -> 'D:\nodejs\node-global\node_modules.macaca-cli.DELETE'
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! https://github.com/npm/npm/issues

npm ERR! Please include the following file with any support request:
npm ERR! D:\nodejs\node-global\node_modules\macaca-cli\npm-debug.log

C:\Users\cmd>npm config get registry
http://registry.cnpmjs.org/

C:\Users\cmd>macaca doctor

Node.js checklist:

node env: D:\nodejs\node.exe
node version: v5.10.1

Android checklist:

JAVA version is 1.8.0_91
JAVA_HOME is set to C:\Program Files\Java\jdk1.8.0_91
ANDROID_HOME is set to D:\Android\android-sdk-windows
Platforms is set to D:\Android\android-sdk-windows\platforms\android-24
Android tools is set to D:\Android\android-sdk-windows\tools\android.bat
ANT_HOME is set to D:\apache-ant-1.9.7

C:\Users\cmd>macaca install ios
macaca-ios is installing for the first time with args: ["install","macaca-ios","-—global","--registry=https://registry.npmjs.org/"]

| loading...macaca-cli@1.0.36 D:\nodejs\node-global\node_modules\macaca-cli
`-- macaca-ios@1.0.30 extraneous

npm ERR! Windows_NT 10.0.10586
npm ERR! argv "D:\nodejs\node.exe" "D:\nodejs\node_modules\npm\bin\npm-cli.js" "install" "macaca-ios" "-—global" "--registry=https://registry.npmjs.org/"
npm ERR! node v5.10.1
npm ERR! npm v3.8.7
npm ERR! path D:\nodejs\node-global\node_modules\macaca-cli
npm ERR! code EBUSY
npm ERR! errno -4082
npm ERR! syscall rename

npm ERR! EBUSY: resource busy or locked, rename 'D:\nodejs\node-global\node_modules\macaca-cli' -> 'D:\nodejs\node-global\node_modules.macaca-cli.DELETE'
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! https://github.com/npm/npm/issues

npm ERR! Please include the following file with any support request:
npm ERR! D:\nodejs\node-global\node_modules\macaca-cli\npm-debug.log

npm install exited with code 4294963214 and signal null
install macaca-ios failed with Error: npm ERR! Windows_NT 10.0.10586
npm ERR! argv "D:\nodejs\node.exe" "D:\nodejs\node_modules\npm\bin\npm-cli.js" "install" "macaca-ios" "-—global" "--registry=https://registry.npmjs.org/"
npm ERR! node v5.10.1
npm ERR! npm v3.8.7
npm ERR! path D:\nodejs\node-global\node_modules\macaca-cli
npm ERR! code EBUSY
npm ERR! errno -4082
npm ERR! syscall rename

npm ERR! EBUSY: resource busy or locked, rename 'D:\nodejs\node-global\node_modules\macaca-cli' -> 'D:\nodejs\node-global\node_modules.macaca-cli.DELETE'
npm ERR!
npm ERR! If you need help, you may report this error at:
npm ERR! https://github.com/npm/npm/issues

npm ERR! Please include the following file with any support request:
npm ERR! D:\nodejs\node-global\node_modules\macaca-cli\npm-debug.log

@xdf 已提交到 github issues 下 盼指正回复。

window7 跑 android 的时候报了错,报错如下:
Error: Command failed: C:\Windows\system32\cmd.exe /s /c "D:\android-sdk-windo
ws/platform-tools/adb -s emulator-5554 push D:\Program Files\nodejs\node-global\
node_modules\macaca-android\node_modules\uiautomator-client\bin\uiautomator-boot
strap.jar /data/local/tmp"
cannot stat 'D:\Program': No such file or directory

at ChildProcess.exithandler (child_process.js:213:12)
at emitTwo (events.js:87:13)
at ChildProcess.emit (events.js:172:7)
at maybeClose (internal/child_process.js:827:16)
at Process.ChildProcess.handle.onexit (internal/childprocess.js:211:5)

#6 楼 @amber_cheng 你这个问题解决了吗

达峰的夏天 Macaca 升级策略调整 [2017-02] 中提及了此贴 02月17日 14:16
需要 登录 后方可回复, 如果你还没有账号请点击这里 注册