IDEA导入Android报错:License for package Android SDK Build-Tools 27.0.3 not accepted

报错信息:

Failed to install the following Android SDK packages as some licences have not been accepted.

        Warning: License for package Android SDK Build-Tools 27.0.3 not accepted.
        Warning: License for package Android SDK Platform 28 not accepted.
解决方法:安装SDK Manager,并安装

IDEA导入Android报错:License for package Android SDK Build-Tools 27.0.3 not accepted