Closed wujunfeng1991 closed 7 years ago
Windows下安装Macaca-android,我也出现过build失败的情况,但是卸载重装之后就好了,你可以试试,另外最好用macaca的淘宝源来安装 npm install -g cnpm --registry=https://registry.npm.taobao.org 然后cnpm i macaca-android -g
同样还出错。暂时没有百度出有价值的信息。 `> 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
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.
What went wrong: A problem occurred configuring project ':app'.
You have not accepted the license agreements of the following SDK components: [Android SDK Platform 26]. Before building your project, you need to accept the license agreements and complete the installation of the missing components using the Android Studio SDK Manager. Alternatively, to learn how to transfer the license agreements from one workstation to another, go to http://d.android.com/r/studio-ui/export-licenses.html
Try: Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.
Get more help at https://help.gradle.org
(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.
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 toD:\jdk
ANDROID_HOME is set toE:\assdk
Platforms is set toE:\assdk\platforms\android-25
ADB tool is set toE:\assdk\platform-tools\adb.exe
GRADLE_HOME is set toE:\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"