macaca icon indicating copy to clipboard operation
macaca copied to clipboard

cnpm i macaca-android -g安装报错

Open WeiboGe2012 opened this issue 8 years ago • 3 comments

C:\Users\Administrator>cnpm i macaca-android -g Downloading macaca-android to C:\Users\Administrator\AppData\Roaming\npm\node_mo dules\macaca-android_tmp Copying C:\Users\Administrator\AppData\Roaming\npm\node_modules\macaca-android_t [email protected]@macaca-android to C:\Users\Administrator\AppData\Roami ng\npm\node_modules\macaca-android Installing macaca-android's dependencies to C:\Users\Administrator\AppData\Roami ng\npm\node_modules\macaca-android/node_modules [1/10] webdriver-dfn-error-code@~1.0.1 installed at node_modules_webdriver-dfn- [email protected]@webdriver-dfn-error-code [2/10] driver-base@~0.1.0 installed at [email protected]@driver-ba se [3/10] temp@~0.8.3 installed at [email protected]@temp [4/10] xml2map@^1.0.2 installed at [email protected]@xml2map [5/10] xlogger@~1.0.0 installed at [email protected]@xlogger [6/10] uiautomatorwd@~1.0.45 installed at [email protected]@uia utomatorwd [7/10] unlock-apk@~1.0.3 installed at [email protected]@unlock-apk [8/10] macaca-adb@~1.0.3 installed at [email protected]@macaca-adb

[9/10] macaca-utils@^1.0.0 installed at [email protected]@macaca- utils [10/10] macaca-chromedriver@~1.0.1 installed at node_modules_macaca-chromedrive [email protected]@macaca-chromedriver execute post install 3 scripts... [1/3] scripts.install uiautomatorwd@~1.0.45 run "node ./scripts/build.js" (node:26432) UnhandledPromiseRejectionWarning: ,NDK is missing a "platforms" dir ectory. If you are using NDK, verify the ndk.dir is set to a valid NDK directory. It is currently set to D:\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.

Checking the license for package Android SDK Platform 26 in D:\android-sdk-windo ws\licenses Warning: License for package Android SDK Platform 26 not accepted. , 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 co mplete the installation of the missing components using the Android Studio SDK M anager. Alternatively, to learn how to transfer the license agreements from one workst ation 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

BUILD FAILED in 3s

(node:26432) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejectio n id: 2) (node:26432) [DEP0018] DeprecationWarning: Unhandled promise rejections are depr ecated. In the future, promise rejections that are not handled will terminate th e Node.js process with a non-zero exit code. [1/3] scripts.install uiautomatorwd@~1.0.45 finished in 5s [2/3] scripts.install unlock-apk@~1.0.3 run "node ./script/build.js" (node:24564) UnhandledPromiseRejectionWarning: ,NDK is missing a "platforms" dir ectory. If you are using NDK, verify the ndk.dir is set to a valid NDK directory. It is currently set to D:\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.

Checking the license for package Android SDK Platform 26 in D:\android-sdk-windo ws\licenses Warning: License for package Android SDK Platform 26 not accepted. , 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 co mplete the installation of the missing components using the Android Studio SDK M anager. Alternatively, to learn how to transfer the license agreements from one workst ation 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

BUILD FAILED in 3s

(node:24564) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). (rejectio n id: 2) (node:24564) [DEP0018] DeprecationWarning: Unhandled promise rejections are depr ecated. In the future, promise rejections that are not handled will terminate th e Node.js process with a non-zero exit code. [2/3] scripts.install unlock-apk@~1.0.3 finished in 7s [3/3] scripts.install macaca-chromedriver@~1.0.1 run "node ./bin/macaca-chromedr iver install"

version: 2.33 chromedriver cdn url: https://tnpm-hz.oss-cn-hangzhou.aliyuncs.com/dist/chrom edriver/2.33/chromedriver_win32.zip chromedriver local in C:\Users\Administrator\AppData\Roaming\npm\node_modules \macaca-android\[email protected]@macaca-chromedriver\exe c\chromedriver2.33.exe [3/3] scripts.install macaca-chromedriver@~1.0.1 finished in 6s deprecate [email protected] › [email protected] › node-uuid@~1.4.7 Use uui d module instead deprecate [email protected] › [email protected] › tough-cookie@~2.2.0 ReDo S vulnerability parsing Set-Cookie https://nodesecurity.io/advisories/130 All packages installed (160 packages installed from npm registry, used 50s, spee d 96.93kB/s, json 138(1.5MB), tarball 3.28MB)

image 5

WeiboGe2012 avatar Apr 02 '18 04:04 WeiboGe2012

到 Sdk-home-Directory/tools/bin 执行

sdkmanager --licenses

有两个需要确认,输入“y”

执行过之后就ok了

baozhida avatar Apr 23 '18 02:04 baozhida

执行 --update 也可以

hustzyd avatar Jun 01 '18 07:06 hustzyd

This is the translated issue comment: @hustzyd


Execute --update can also

macaca-bot avatar Jun 01 '18 07:06 macaca-bot