1. 程式人生 > >編譯ionic時出錯:You have not accepted the license agreements of the following SDK components

編譯ionic時出錯:You have not accepted the license agreements of the following SDK components

最近安裝ionic後,新建了一個專案,結果在編譯是重試幾次都出錯:

BUILD FAILED


Total time: 3.638 secs


Error: cmd: Command failed with exit code 1 Error output:
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 25].
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.

最後通過開啟android sdk manager.exe後把相應缺少的包(我這裡就是Android SDK Platform 25相關的工具)安裝完成,然後再執行就能解決問題。