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.
(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.