A problem occurred configuring project ‘:CordovaLib’. You have not accepted the license agreements of the following SDK components:

android の platform を削除後、build 仕様とすると上記のエラーが [Android SDK Platform 27]. のライセンスをacceptしないといけないらしい。

What went wrong:
A problem occurred configuring project ‘:CordovaLib’.
You have not accepted the license agreements of the following SDK components:
[Android SDK Platform 27].
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

原因が不明ではあるが、 android studio をインストールし

File -> settings -> Appearance & Behavior -> System Settings -> Android SDK より

API Level 27 のインストールしてみたところコンパイルでき、実行できた。

自動でインストールされているSDKは承認(license agreements)されていないということかな?