Ionic build error : You have not accepted the lice

2019-02-03 23:53发布

I'm trying to run the command ionic build android --release to build the apk but i am getting this error

Total time: 1.767 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 24]. 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. Picked up _JAVA_OPTIONS: -Xmx512M

17条回答
该账号已被封号
2楼-- · 2019-02-04 00:00

My software:

Ubuntu 16.04.2 LTS
Gradle 3.5
java version "1.8.0_131"
$ANDROID_HOME = ~/AndroidSDK

Working solution:

yes | $ANDROID_HOME/tools/bin/sdkmanager "build-tools;25.0.2

of course you should use your version of build-tools.

Source:

Automatically accept all SDK licences

查看更多
看我几分像从前
3楼-- · 2019-02-04 00:00

Install the latest Android Studio and accept the license agreement.

https://developer.android.com/studio/index.html

查看更多
贼婆χ
4楼-- · 2019-02-04 00:03

Install the license:

mkdir "%ANDROID_HOME%\licenses"

echo |set /p="8933bad161af4178b1185d1a37fbf41ea5269c55" > "%ANDROID_HOME%\licenses\android-sdk-license"

查看更多
一纸荒年 Trace。
5楼-- · 2019-02-04 00:05

Install Platform 24 (Android 7) solved this problem

查看更多
何必那么认真
6楼-- · 2019-02-04 00:07

In Command Prompt, go to ANDROID_HOME\tools\bin

Then run the command, sdkmanager --licenses

Accept the licenses you want when it is prompted.

查看更多
▲ chillily
7楼-- · 2019-02-04 00:07

Install sdk 25 and accept the license from android studio. That solved my issues.

查看更多
登录 后发表回答