Ionic build error : You have not accepted the license agreements of the following SDK components: [Android SDK Platform 24]

后端 未结 18 1614
挽巷
挽巷 2020-12-08 18:59

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:

相关标签:
18条回答
  • 2020-12-08 19:34

    Please visit https://discuss.circleci.com/t/licences-for-android-build-tools-not-accepted/17285/18

    dependencies:

    override:

    echo y | android update sdk --no-ui --all --filter build-tools-26.0.2,android-26
    

    instead of my original:

    dependencies:

    override:

    echo y | android update sdk --no-ui --all --filter build-tools-26.0.2
    
    0 讨论(0)
  • 2020-12-08 19:40

    Install Platform 24 (Android 7) solved this problem

    0 讨论(0)
  • 2020-12-08 19:40

    This worked for me under ubuntu :

    mkdir "$ANDROID_SDK/licenses" || true
    echo -e "\n8933bad161af4178b1185d1a37fbf41ea5269c55" > "$ANDROID_SDK/licenses/android-sdk-license"
    echo -e "\n84831b9409646a918e30573bab4c9c91346d8abd" > "$ANDROID_SDK/licenses/android-sdk-preview-license"
    

    source: Dori's answer to automatically-accept-all-sdk-licences

    0 讨论(0)
  • 2020-12-08 19:40

    I had same situation and all of the above suggestion did not work because either my installation and component folder names are different or the files are in different places.

    I had old installation of Android Studio in C and new in E. I had uninstalled the old version but Android studio did not clear all files and reset my Env. Variable. So I simply did following

    1) Searched for this file: android-sdk-license

    2) See if above file is in folder Licenses surrounded by other folders like add-ons, build-tools, emulator etc.

    3) Then make sure ANDROID_HOME is pointing to this parent folder of Licenses.

    0 讨论(0)
  • 2020-12-08 19:43

    If you are having issues coming from a newer version of Android SDK then change your target version in your config.xml.

    Next, open Android Studio>Configure>SDK Manager

    Check the version you need for 24 use 7.0 and check it. Then install it and try to build again.

    0 讨论(0)
  • 2020-12-08 19:44

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

    0 讨论(0)
提交回复
热议问题