alibaba / macaca

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

app-debug.apk和app-debug-androidTest.apk在安装macaca-android模块的时候build失败 #639

Closed wujunfeng1991 closed 7 years ago

wujunfeng1991 commented 7 years ago

macaca doctor如下: macaca-doctor version: 2.0.1

Node.js checklist:

node env: D:\NodeJs\node.exe node version: v6.11.0

Android checklist:

JAVA version is 1.8.0_60 JAVA_HOME is set to D:\jdk ANDROID_HOME is set to E:\assdk Platforms is set to E:\assdk\platforms\android-25 ADB tool is set to E:\assdk\platform-tools\adb.exe GRADLE_HOME is set to E:\androidstudio\gradle\gradle-3.2

Installed driver list:

android: 2.0.28 chrome: 1.0.5 electron: 1.1.6

但是在安装macaca-android模块的时候,在生成app-debug.apk和app-debug-androidTest.apk时会失败,影响后面运行sample,这个该如何解决?log: execute post install 3 scripts... [1/3] scripts.install unlock-apk@~1.0.3 run "node ./script/build.js" 'gradle' �����ڲ����ⲿ���Ҳ���ǿ����еij��� ���������ļ��� (node:12856) UnhandledPromiseRejectionWarning: Unhandled promise rejection (reje ction id: 1): Error: build failed [1/3] scripts.install unlock-apk@~1.0.3 finished in 201ms [2/3] scripts.install uiautomatorwd@~1.0.36 run "node ./scripts/build.js" 'gradle' �����ڲ����ⲿ���Ҳ���ǿ����еij��� ���������ļ��� (node:2748) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejec tion id: 1): Error: build failed [2/3] scripts.install uiautomatorwd@~1.0.36 finished in 200ms [3/3] scripts.install macaca-chromedriver@~1.0.1 run "node ./bin/macaca-chromedr iver install"

chromedriver cdn url: https://tnpm-hz.oss-cn-hangzhou.aliyuncs.com/dist/chrom edriver/2.20/chromedriver_win32.zip chromedriver local in C:\Users\Administrator\AppData\Roaming\npm\node_modules \macaca-android\node_modules_macaca-chromedriver@1.0.31@macaca-chromedriver\exe c\chromedriver.exe [3/3] scripts.install macaca-chromedriver@~1.0.1 finished in 3s deprecate unlock-apk@1.0.5 › gradle@1.0.7 › win-spawn@^2.0.0 use cross-spawn or cross-spawn-async instead. deprecate macaca-chromedriver@1.0.31 › request@2.69.0 › node-uuid@~1.4.7 Use uui d module instead deprecate macaca-chromedriver@1.0.31 › request@2.69.0 › tough-cookie@~2.2.0 ReDo S vulnerability parsing Set-Cookie https://nodesecurity.io/advisories/130

wuchao01 commented 7 years ago

Windows下安装Macaca-android,我也出现过build失败的情况,但是卸载重装之后就好了,你可以试试,另外最好用macaca的淘宝源来安装 npm install -g cnpm --registry=https://registry.npm.taobao.org 然后cnpm i macaca-android -g

zhongw commented 7 years ago

同样还出错。暂时没有百度出有价值的信息。 `> uiautomatorwd@1.0.42 install C:\Users\admin\AppData\Roaming\npm\node_modules\macaca-android\node_modules\uiautomatorwd

node ./scripts/build.js

'gradle' �����ڲ����ⲿ���Ҳ���ǿ����еij��� ���������ļ��� (node:215564) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: build failed (node:215564) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.` 版本信息如下:

macaca-doctor version: 2.0.2 Node.js checklist: node env: D:\Program Files\nodejs\node.exe node version: v8.4.0 Android checklist: JAVA version is 1.8.0_144 ANDROID_HOME is set to D:\Dev\Android\sdk Platforms is set to D:\Dev\Android\sdk\platforms\android-26 ADB tool is set to D:\Dev\Android\sdk\platform-tools\adb.exe GRADLE_HOME is set to D:\Software\gradle-4.1 Installed driver list: android: 2.0.36

sougannkyou commented 6 years ago

cnpm i macaca-android -g 还有错误,“License for package Android SDK Platform 26 not accepted.”,请教什么原因? log如下: D:\workspace\eWork\mobile>cnpm i macaca-android -g Downloading macaca-android to C:\Users\syq\AppData\Roaming\npm\node_modules\macaca-android_tmp Copying C:\Users\syq\AppData\Roaming\npm\node_modules\macaca-android_tmp_macaca-android@2.0.47@macaca-android to C:\Users\syq\AppData\Roaming\npm\node_modules\macaca-android Installing macaca-android's dependencies to C:\Users\syq\AppData\Roaming\npm\node_modules\macaca-android/node_modules [1/10] webdriver-dfn-error-code@~1.0.1 installed at node_modules_webdriver-dfn-error-code@1.0.4@webdriver-dfn-error-code [2/10] driver-base@~0.1.0 installed at node_modules_driver-base@0.1.4@driver-base [3/10] temp@~0.8.3 installed at node_modules_temp@0.8.3@temp [4/10] xml2map@^1.0.2 installed at node_modules_xml2map@1.0.2@xml2map [5/10] macaca-adb@~1.0.3 installed at node_modules_macaca-adb@1.0.33@macaca-adb [6/10] xlogger@~1.0.0 installed at node_modules_xlogger@1.0.6@xlogger [7/10] unlock-apk@~1.0.3 installed at node_modules_unlock-apk@1.0.8@unlock-apk [8/10] uiautomatorwd@~1.0.45 installed at node_modules_uiautomatorwd@1.0.50@uiautomatorwd [9/10] macaca-utils@^1.0.0 installed at node_modules_macaca-utils@1.0.1@macaca-utils [10/10] macaca-chromedriver@~1.0.1 installed at node_modules_macaca-chromedriver@1.0.41@macaca-chromedriver execute post install 3 scripts... [1/3] scripts.install unlock-apk@~1.0.3 run "node ./script/build.js" (node:7356) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): ,

Configure project :app Checking the license for package Android SDK Platform 26 in C:\Android\android-sdk\licenses Warning: License for package Android SDK Platform 26 not accepted.

BUILD FAILED in 2s , FAILURE: Build failed with an exception.

(node:7356) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code. [1/3] scripts.install unlock-apk@~1.0.3 finished in 3s [2/3] scripts.install uiautomatorwd@~1.0.45 run "node ./scripts/build.js" (node:15004) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): ,

Configure project :app Checking the license for package Android SDK Platform 26 in C:\Android\android-sdk\licenses Warning: License for package Android SDK Platform 26 not accepted.

BUILD FAILED in 2s , FAILURE: Build failed with an exception.