Macaca 求助:使用 npm i macaca-android -g 命令安装 macaca-android 成功,但 Installed driver list 表示 android: 2.0.23 [out-of-date] 是什么原因?

ding · 2017年07月10日 · 最后由 回复于 2018年05月30日 · 1735 次阅读

C:\WINDOWS\system32>npm i macaca-android -g
npm WARN deprecated tough-cookie@2.2.2: ReDoS vulnerability parsing Set-Cookie https://nodesecurity.io/advisories/130
npm WARN deprecated node-uuid@1.4.8: Use uuid module instead
npm WARN deprecated win-spawn@2.0.0: use [cross-spawn](https://github.com/IndigoUnited/node-cross-spawn) or [cross-spawn-async](https://github.com/IndigoUnited/node-cross-spawn-async) instead.

> macaca-chromedriver@1.0.31 install C:\nodejs\node-global\node_modules\macaca-android\node_modules\macaca-chromedriver
> node ./bin/macaca-chromedriver install

>> chromedriver cdn url: http://chromedriver.storage.googleapis.com/2.20/chromedriver_win32.zip
>> chromedriver local in C:\nodejs\node-global\node_modules\macaca-android\node_modules\macaca-chromedriver\exec\chromedriver.exe

> unlock-apk@1.0.5 install C:\nodejs\node-global\node_modules\macaca-android\node_modules\unlock-apk
> node ./script/build.js

Starting a Gradle Daemon, 2 incompatible and 1 stopped Daemons could not be reused, use --status for details

NDK is missing a "platforms" directory.
If you are using NDK, verify the ndk.dir is set to a valid NDK directory.  It is currently set to C:\macaca\android-sdk_r24.4.1-windows\android-sdk-windows\ndk-bundle.
If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.properties to remove this warning.
:app:preBuild

UP-TO-DATE
:app:preDebugBuild
UP-TO-DATE
:app:checkDebugManifest

:app:prepareDebugDependencies

:app:compileDebugAidl

:app:compileDebugRenderscript

:app:generateDebugBuildConfig

:app:generateDebugResValues

:app:generateDebugResources

:app:mergeDebugResources

:app:processDebugManifest

:app:processDebugResources

:app:generateDebugSources
:app:incrementalDebugJavaCompilationSafeguard

:app:javaPreCompileDebug
:app:compileDebugJavaWithJavac

:app:compileDebugJavaWithJavac - is not incremental (e.g. outputs have changed, no previous execution, etc.).
ע: C:\nodejs\node-global\node_modules\macaca-android\node_modules\unlock-apk\app\src\main\java\xdf\android_unlock\MainActivity.javaʹ�û�����ѹ�ʱ�� API��
ע: �й���ϸ��Ϣ, ��ʹ�� -Xlint:deprecation ���±��롣
:app:compileDebugNdk
NO-SOURCE
:app:compileDebugSources
:app:mergeDebugShaders

:app:compileDebugShaders

:app:generateDebugAssets
:app:mergeDebugAssets

:app:transformClassesWithDexForDebug

Running dex as a separate process.

To run dex in process, the Gradle daemon needs a larger heap.
It currently has 1024 MB.
For faster builds, increase the maximum heap size for the Gradle daemon to at least 1536 MB.
To do this set org.gradle.jvmargs=-Xmx1536M in the project gradle.properties.
For more information see https://docs.gradle.org/current/userguide/build_environment.html
:app:mergeDebugJniLibFolders

:app:transformNativeLibsWithMergeJniLibsForDebug

:app:processDebugJavaRes

NO-SOURCE
:app:transformResourcesWithMergeJavaResForDebug

:app:validateSigningDebug

:app:packageDebug

:app:assembleDebug

BUILD SUCCESSFUL

Total time: 30.848 secs

> uiautomatorwd@1.0.39 install C:\nodejs\node-global\node_modules\macaca-android\node_modules\uiautomatorwd
> node ./scripts/build.js

NDK is missing a "platforms" directory.
If you are using NDK, verify the ndk.dir is set to a valid NDK directory.  It is currently set to C:\macaca\android-sdk_r24.4.1-windows\android-sdk-windows\ndk-bundle.
If you are not using NDK, unset the NDK variable from ANDROID_NDK_HOME or local.properties to remove this warning.

A larger heap for the Gradle daemon is recommended for running jack.

It currently has 1024 MB.
For faster builds, increase the maximum heap size for the Gradle daemon to at least 1536 MB.
To do this set org.gradle.jvmargs=-Xmx1536M in the project gradle.properties.
For more information see https://docs.gradle.org/current/userguide/build_environment.html

A larger heap for the Gradle daemon is recommended for running jack.

It currently has 1024 MB.
For faster builds, increase the maximum heap size for the Gradle daemon to at least 1536 MB.
To do this set org.gradle.jvmargs=-Xmx1536M in the project gradle.properties.
For more information see https://docs.gradle.org/current/userguide/build_environment.html
A larger heap for the Gradle daemon is recommended for running jack.

It currently has 1024 MB.
For faster builds, increase the maximum heap size for the Gradle daemon to at least 1536 MB.
To do this set org.gradle.jvmargs=-Xmx1536M in the project gradle.properties.
For more information see https://docs.gradle.org/current/userguide/build_environment.html
:app:preBuild
UP-TO-DATE

:app:preDebugBuild
UP-TO-DATE
:app:compileDebugNdk
NO-SOURCE
:app:checkDebugManifest
:app:prepareDebugDependencies
:app:compileDebugAidl

:app:compileDebugRenderscript

:app:generateDebugBuildConfig

:app:generateDebugResValues

:app:generateDebugResources
:app:mergeDebugResources

:app:processDebugManifest

C:\nodejs\node-global\node_modules\macaca-android\node_modules\uiautomatorwd\app\src\main\AndroidManifest.xml:9:5-67 Warning:
        Element uses-permission#android.permission.INTERNET at AndroidManifest.xml:9:5-67 duplicated with element declared at AndroidManifest.xml:7:5-67
:app:processDebugResources

:app:generateDebugSources
:app:transformClassesWithPreJackPackagedLibrariesForDebug

:app:transformClassesWithPreJackRuntimeLibrariesForDebug

:app:processDebugJavaRes

NO-SOURCE
:app:transformResourcesWithMergeJavaResForDebug

:app:transformJackWithJackForDebug

:app:compileDebugSources
:app:mergeDebugShaders

:app:compileDebugShaders

:app:generateDebugAssets

:app:mergeDebugAssets

:app:mergeDebugJniLibFolders

:app:transformNativeLibsWithMergeJniLibsForDebug

:app:validateSigningDebug
:app:packageDebug

:app:assembleDebug
:app:preDebugAndroidTestBuild UP-TO-DATE
:app:compileDebugAndroidTestNdk
NO-SOURCE

:app:prepareComAndroidSupportTestExposedInstrumentationApiPublish05Library

:app:prepareComAndroidSupportTestRunner05Library

:app:prepareComAndroidSupportTestUiautomatorUiautomatorV18212Library

:app:prepareDebugAndroidTestDependencies

:app:compileDebugAndroidTestAidl

:app:processDebugAndroidTestManifest

:app:compileDebugAndroidTestRenderscript

:app:generateDebugAndroidTestBuildConfig

:app:generateDebugAndroidTestResValues

:app:generateDebugAndroidTestResources

:app:mergeDebugAndroidTestResources

:app:processDebugAndroidTestResources

:app:generateDebugAndroidTestSources
:app:transformClassesWithPreJackPackagedLibrariesForDebugAndroidTest

:app:transformClassesWithPreJackRuntimeLibrariesForDebugAndroidTest

:app:processDebugAndroidTestJavaRes

NO-SOURCE
:app:transformResourcesWithMergeJavaResForDebugAndroidTest

:app:transformJackWithJackForDebugAndroidTest

C:\nodejs\node-global\node_modules\macaca-android\node_modules\uiautomatorwd\app\src\androidTest\java\com\macaca\android\testing\server\xmlUtils\UiAutomationElement.java:26:24: The value of the field UiAutomationElement.visibleBounds is not used
C:\nodejs\node-global\node_modules\macaca-android\node_modules\uiautomatorwd\app\src\androidTest\java\com\macaca\android\testing\server\xmlUtils\UiAutomationElement.java:117:34: The static method getElement(AccessibilityNodeInfo, UiAutomationElement, int) from the type UiAutomationElement should be accessed in a static way
C:\nodejs\node-global\node_modules\macaca-android\node_modules\uiautomatorwd\app\src\androidTest\java\fi\iki\elonen\router\RouterNanoHTTPD.java:154:55: The method getParms() from the type NanoHTTPD.IHTTPSession is deprecated
C:\nodejs\node-global\node_modules\macaca-android\node_modules\uiautomatorwd\app\src\androidTest\java\com\macaca\android\testing\server\controllers\ElementController.java:159:26: Iterator is a raw type. References to generic type Iterator<E> should be parameterized
C:\nodejs\node-global\node_modules\macaca-android\node_modules\uiautomatorwd\app\src\androidTest\java\com\macaca\android\testing\server\controllers\SourceController.java:9:8: The type EncodingUtils is deprecated
C:\nodejs\node-global\node_modules\macaca-android\node_modules\uiautomatorwd\app\src\androidTest\java\com\macaca\android\testing\server\controllers\SourceController.java:49:27: The type EncodingUtils is deprecated
C:\nodejs\node-global\node_modules\macaca-android\node_modules\uiautomatorwd\app\src\androidTest\java\com\macaca\android\testing\server\controllers\SourceController.java:49:41: The method getString(byte[], String) from the type EncodingUtils is deprecated
C:\nodejs\node-global\node_modules\macaca-android\node_modules\uiautomatorwd\app\src\androidTest\java\com\macaca\android\testing\server\xmlUtils\MUiDevice.java:28:20: The value of the field MUiDevice.METHOD_FIND_MATCH is not used
C:\nodejs\node-global\node_modules\macaca-android\node_modules\uiautomatorwd\app\src\androidTest\java\com\macaca\android\testing\server\xmlUtils\MUiDevice.java:29:20: The value of the field MUiDevice.METHOD_FIND_MATCHS is not used
C:\nodejs\node-global\node_modules\macaca-android\node_modules\uiautomatorwd\app\src\androidTest\java\com\macaca\android\testing\server\xmlUtils\MUiDevice.java:30:13: Class is a raw type. References to generic type Class<T> should be parameterized
C:\nodejs\node-global\node_modules\macaca-android\node_modules\uiautomatorwd\app\src\androidTest\java\com\macaca\android\testing\server\xmlUtils\MUiDevice.java:30:19: The value of the field MUiDevice.ByMatcher is not used
C:\nodejs\node-global\node_modules\macaca-android\node_modules\uiautomatorwd\app\src\androidTest\java\com\macaca\android\testing\server\xmlUtils\MUiDevice.java:31:29: The value of the field MUiDevice.mInstrumentation is not used
C:\nodejs\node-global\node_modules\macaca-android\node_modules\uiautomatorwd\app\src\androidTest\java\com\macaca\android\testing\server\xmlUtils\MUiDevice.java:32:20: The value of the field MUiDevice.API_LEVEL_ACTUAL is not used
C:\nodejs\node-global\node_modules\macaca-android\node_modules\uiautomatorwd\app\src\androidTest\java\com\macaca\android\testing\server\xmlUtils\MUiDevice.java:62:9: Class is a raw type. References to generic type Class<T> should be parameterized
C:\nodejs\node-global\node_modules\macaca-android\node_modules\uiautomatorwd\app\src\androidTest\java\com\macaca\android\testing\server\xmlUtils\MUiDevice.java:63:9: Constructor is a raw type. References to generic type Constructor<T> should be parameterized
C:\nodejs\node-global\node_modules\macaca-android\node_modules\uiautomatorwd\app\src\androidTest\java\com\macaca\android\testing\server\xmlUtils\MUiDevice.java:91:27: Dead code
C:\nodejs\node-global\node_modules\macaca-android\node_modules\uiautomatorwd\app\src\androidTest\java\com\macaca\android\testing\server\controllers\KeysController.java:40:26: Iterator is a raw type. References to generic type Iterator<E> should be parameterized
C:\nodejs\node-global\node_modules\macaca-android\node_modules\uiautomatorwd\app\src\androidTest\java\com\macaca\android\testing\server\xmlUtils\XPathSelector.java:50:26: The value of the field XPathSelector.xPathString is not used
C:\nodejs\node-global\node_modules\macaca-android\node_modules\uiautomatorwd\app\src\androidTest\java\com\macaca\android\testing\server\xmlUtils\XPathSelector.java:59:30: UiElement is a raw type. References to generic type UiElement<R,E> should be parameterized
C:\nodejs\node-global\node_modules\macaca-android\node_modules\uiautomatorwd\app\src\androidTest\java\com\macaca\android\testing\server\xmlUtils\ReflectionUtils.java:23:19: Class is a raw type. References to generic type Class<T> should be parameterized
C:\nodejs\node-global\node_modules\macaca-android\node_modules\uiautomatorwd\app\src\androidTest\java\com\macaca\android\testing\server\xmlUtils\ReflectionUtils.java:27:41: Class is a raw type. References to generic type Class<T> should be parameterized
C:\nodejs\node-global\node_modules\macaca-android\node_modules\uiautomatorwd\app\src\androidTest\java\com\macaca\android\testing\server\xmlUtils\ReflectionUtils.java:34:9: Class is a raw type. References to generic type Class<T> should be parameterized
C:\nodejs\node-global\node_modules\macaca-android\node_modules\uiautomatorwd\app\src\androidTest\java\com\macaca\android\testing\server\xmlUtils\ReflectionUtils.java:42:39: Class is a raw type. References to generic type Class<T> should be parameterized
C:\nodejs\node-global\node_modules\macaca-android\node_modules\uiautomatorwd\app\src\androidTest\java\com\macaca\android\testing\server\xmlUtils\ReflectionUtils.java:42:83: Class is a raw type. References to generic type Class<T> should be parameterized
C:\nodejs\node-global\node_modules\macaca-android\node_modules\uiautomatorwd\app\src\androidTest\java\com\macaca\android\testing\server\xmlUtils\ReflectionUtils.java:43:31: Type safety: The method getDeclaredMethod(String, Class...) belongs to the raw type Class. References to generic type Class<T> should be parameterized
C:\nodejs\node-global\node_modules\macaca-android\node_modules\uiautomatorwd\app\src\androidTest\java\com\macaca\android\testing\server\xmlUtils\ReflectionUtils.java:48:84: Class is a raw type. References to generic type Class<T> should be parameterized
C:\nodejs\node-global\node_modules\macaca-android\node_modules\uiautomatorwd\app\src\androidTest\java\com\macaca\android\testing\server\controllers\AlertController.java:6:8: The import android.support.test.uiautomator.UiObjectNotFoundException is never used
C:\nodejs\node-global\node_modules\macaca-android\node_modules\uiautomatorwd\app\src\androidTest\java\com\macaca\android\testing\server\xmlUtils\UiAutomatorBridge.java:38:37: The static method getUiDevice() from the type UiAutomatorBridge should be accessed in a static way
C:\nodejs\node-global\node_modules\macaca-android\node_modules\uiautomatorwd\app\src\androidTest\java\com\macaca\android\testing\server\xmlUtils\UiAutomatorBridge.java:49:33: The method getInstance() from the type UiDevice is deprecated
C:\nodejs\node-global\node_modules\macaca-android\node_modules\uiautomatorwd\app\src\androidTest\java\com\macaca\android\testing\server\xmlUtils\UiElement.java:27:16: Type safety: Unchecked cast from Object to T
:app:compileDebugAndroidTestSources

:app:mergeDebugAndroidTestShaders

:app:compileDebugAndroidTestShaders

:app:generateDebugAndroidTestAssets
:app:mergeDebugAndroidTestAssets

:app:mergeDebugAndroidTestJniLibFolders

:app:transformNativeLibsWithMergeJniLibsForDebugAndroidTest

:app:validateSigningDebugAndroidTest

:app:packageDebugAndroidTest

:app:assembleDebugAndroidTest

BUILD SUCCESSFUL

Total time: 1 mins 8.938 secs
C:\nodejs\node-global
`-- macaca-android@2.0.28
  +-- driver-base@0.1.4
  +-- macaca-adb@1.0.23
  | +-- chalk@1.1.3
  | | +-- ansi-styles@2.2.1
  | | +-- escape-string-regexp@1.0.5
  | | +-- has-ansi@2.0.0
  | | | `-- ansi-regex@2.1.1
  | | +-- strip-ansi@3.0.1
  | | `-- supports-color@2.0.0
  | +-- commander@2.11.0
  | +-- npm-update@1.0.5
  | | `-- co-request@0.2.1
  | `-- xutil@1.0.5
  |   +-- ipv4@0.0.4
  |   +-- lodash@3.10.1
  |   +-- mkdirp@0.5.1
  |   | `-- minimist@0.0.8
  |   +-- moment@2.10.6
  |   +-- rimraf@2.5.4
  |   | `-- glob@7.1.2
  |   |   +-- fs.realpath@1.0.0
  |   |   +-- inflight@1.0.6
  |   |   | `-- wrappy@1.0.2
  |   |   +-- inherits@2.0.3
  |   |   +-- minimatch@3.0.4
  |   |   | `-- brace-expansion@1.1.8
  |   |   |   +-- balanced-match@1.0.0
  |   |   |   `-- concat-map@0.0.1
  |   |   +-- once@1.4.0
  |   |   `-- path-is-absolute@1.0.1
  |   `-- uuid@3.1.0
  +-- macaca-chromedriver@1.0.31
  | +-- adm-zip@0.4.7
  | +-- commander@2.9.0
  | | `-- graceful-readlink@1.0.1
  | +-- detect-port@1.2.1
  | | +-- address@1.0.2
  | | `-- debug@2.6.8
  | |   `-- ms@2.0.0
  | `-- request@2.69.0
  |   +-- aws-sign2@0.6.0
  |   +-- aws4@1.6.0
  |   +-- bl@1.0.3
  |   | `-- readable-stream@2.0.6
  |   |   +-- core-util-is@1.0.2
  |   |   +-- isarray@1.0.0
  |   |   +-- process-nextick-args@1.0.7
  |   |   +-- string_decoder@0.10.31
  |   |   `-- util-deprecate@1.0.2
  |   +-- caseless@0.11.0
  |   +-- combined-stream@1.0.5
  |   | `-- delayed-stream@1.0.0
  |   +-- extend@3.0.1
  |   +-- forever-agent@0.6.1
  |   +-- form-data@1.0.1
  |   | `-- async@2.5.0
  |   |   `-- lodash@4.17.4
  |   +-- har-validator@2.0.6
  |   | +-- is-my-json-valid@2.16.0
  |   | | +-- generate-function@2.0.0
  |   | | +-- generate-object-property@1.2.0
  |   | | | `-- is-property@1.0.2
  |   | | +-- jsonpointer@4.0.1
  |   | | `-- xtend@4.0.1
  |   | `-- pinkie-promise@2.0.1
  |   |   `-- pinkie@2.0.4
  |   +-- hawk@3.1.3
  |   | +-- boom@2.10.1
  |   | +-- cryptiles@2.0.5
  |   | +-- hoek@2.16.3
  |   | `-- sntp@1.0.9
  |   +-- http-signature@1.1.1
  |   | +-- assert-plus@0.2.0
  |   | +-- jsprim@1.4.0
  |   | | +-- assert-plus@1.0.0
  |   | | +-- extsprintf@1.0.2
  |   | | +-- json-schema@0.2.3
  |   | | `-- verror@1.3.6
  |   | `-- sshpk@1.13.1
  |   |   +-- asn1@0.2.3
  |   |   +-- assert-plus@1.0.0
  |   |   +-- bcrypt-pbkdf@1.0.1
  |   |   +-- dashdash@1.14.1
  |   |   | `-- assert-plus@1.0.0
  |   |   +-- ecc-jsbn@0.1.1
  |   |   +-- getpass@0.1.7
  |   |   | `-- assert-plus@1.0.0
  |   |   +-- jsbn@0.1.1
  |   |   `-- tweetnacl@0.14.5
  |   +-- is-typedarray@1.0.0
  |   +-- isstream@0.1.2
  |   +-- json-stringify-safe@5.0.1
  |   +-- mime-types@2.1.15
  |   | `-- mime-db@1.27.0
  |   +-- node-uuid@1.4.8
  |   +-- oauth-sign@0.8.2
  |   +-- qs@6.0.4
  |   +-- stringstream@0.0.5
  |   +-- tough-cookie@2.2.2
  |   `-- tunnel-agent@0.4.3
  +-- macaca-utils@0.1.9
  +-- temp@0.8.3
  | +-- os-tmpdir@1.0.2
  | `-- rimraf@2.2.8
  +-- uiautomatorwd@1.0.39
  | +-- gradle@1.0.7
  | | `-- win-spawn@2.0.0
  | `-- request@2.81.0
  |   +-- caseless@0.12.0
  |   +-- form-data@2.1.4
  |   | `-- asynckit@0.4.0
  |   +-- har-validator@4.2.1
  |   | +-- ajv@4.11.8
  |   | | +-- co@4.6.0
  |   | | `-- json-stable-stringify@1.0.1
  |   | |   `-- jsonify@0.0.0
  |   | `-- har-schema@1.0.5
  |   +-- performance-now@0.2.0
  |   +-- qs@6.4.0
  |   +-- safe-buffer@5.1.1
  |   +-- tough-cookie@2.3.2
  |   | `-- punycode@1.4.1
  |   `-- tunnel-agent@0.6.0
  +-- unlock-apk@1.0.5
  +-- webdriver-dfn-error-code@1.0.4
  +-- xlogger@1.0.6
  `-- xml2map@1.0.2
    +-- sax@0.4.2
    `-- xml-writer@1.7.0

C:\WINDOWS\system32>macaca doctor

  macaca-doctor version: 2.0.1


  Node.js checklist:

  node env: C:\nodejs\node.exe
  node version: v4.4.7 lower than v6.9.2

  Android checklist:

  JAVA version is `1.8.0_91`
  JAVA_HOME is set to `C:\Program Files\Java1.8\jdk1.8.0_91`
  ANDROID_HOME is set to `C:\macaca\android-sdk_r24.4.1-windows\android-sdk-windows`
  Platforms is set to `C:\macaca\android-sdk_r24.4.1-windows\android-sdk-windows\platforms\android-25`
  ADB tool is set to `C:\macaca\android-sdk_r24.4.1-windows\android-sdk-windows\platform-tools\adb.exe`
  GRADLE_HOME is set to `C:\macaca\gradle-3.5-all\gradle-3.5`

  Installed driver list:

  android: 2.0.23 [out-of-date]
  chrome: 1.0.5
  electron: 1.1.6


共收到 2 条回复 时间 点赞

重新安装 android: 2.0.23 这个版本的驱动可以解决该问题,至于原因,这个问题有待大神解答

SunBa 回复

请问如何安装呢??

需要 登录 后方可回复, 如果你还没有账号请点击这里 注册