android - 如何修复 "Failed to install ' cordova-plugin-console' :Error "

标签 android angularjs cordova ionic-framework phonegap-plugins

我正在尝试制作 apk 文件。 我有安装了 sdk 和 jdk 的 android studio。 但是当我尝试将 android 包添加到我的 ionic 文件夹时。我得到这个错误

FAILURE: Build failed with an exception.

* What went wrong:
A problem occurred configuring root project 'android'.
> You have not accepted the license agreements of the following SDK components:
[Android SDK Platform 24].
Before building your project, you need to accept the license agreements and comp
lete the installation of the missing components using the Android Studio SDK Man
ager.
Alternatively, to learn how to transfer the license agreements from one workstat
ion 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.



BUILD FAILED




Total time: 44.28 secs

Failed to install 'cordova-plugin-console':Error: cmd: Command failed with exit
code 1
    at ChildProcess.whenDone (C:\ionic\lcalc\platforms\android\cordova\node_modu
les\cordova-common\src\superspawn.js:169:23)
    at emitTwo (events.js:106:13)
    at ChildProcess.emit (events.js:191:7)
    at maybeClose (internal/child_process.js:877:16)
    at Process.ChildProcess._handle.onexit (internal/child_process.js:226:5)
Error: cmd: Command failed with exit code 1

帮助:(

最佳答案

CLI 打印构建失败的确切原因。请注意以下行:

A problem occurred configuring root project 'android'.
> You have not accepted the license agreements of the following SDK components:
[Android SDK Platform 24].

因此打开您的 SDK 管理器(如果您不是管理员,则可能需要以管理员身份打开)

安装所需的 SDK 版本。看附图enter image description here

关于android - 如何修复 "Failed to install ' cordova-plugin-console' :Error ",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/41090061/

相关文章:

Android AlertDialog按钮点击

java - 如何打开 .apk 文件

Android 致命信号 11 SIGSEGV

javascript - 使用 Framework7 和 AngularJS 加载页面

java - Android 黑客攻击预防

javascript - AngularJS Jasmine promise 测试因超时而失败

angularjs - 单元格标题中的 Angular ui-grid 事件未触发

javascript - ng-disabled 无法在按钮中工作

xcode - 使用Cordova CLI构建和打包iOS应用程序时遇到麻烦

iphone - 如何在 iOS 视网膜和非视网膜屏幕底部放置 admob 横幅