Android SDK Platform 26 license error in Ionic 3

后端 未结 10 1995
粉色の甜心
粉色の甜心 2021-01-14 13:29

I\'m trying to run my Ionic 3 project on my Android device with ionic cordova run android --device --stacktrace, but, I\'ve the following output:

相关标签:
10条回答
  • 2021-01-14 13:35

    Check your cordova-android version . Try to run with the cordova-android version 6.2.3 .

    if the above solution doesn't work follow this process.

    1. Download android studio SDK Manager

    2. Download the SDK for version 26.

      https://developer.android.com/studio/intro/update.html

    Update

    based on your Update you are adding the version in your package.json as follows

    "cordova-android": "~6.3.0" so change this to following format as follows "cordova-android": "6.3.0" Reference to the Issue

    Note if the above format doesn't work for the 6.3.0 , try the same with the 6.2.0 as follows "cordova-android": "6.2.0"

    0 讨论(0)
  • 2021-01-14 13:38

    Go to the android sdk folder, copy the licenses folder from there, and paste the folder to the path below:

    C:\Users\intel\AppData\Local\Android\Sdk
    
    0 讨论(0)
  • 2021-01-14 13:39

    In my case, using Visual Studio + Cordova, this case was solved by copying "licenses" folder from your %ANDROID_HOME% folder to "C:\ProgramData\Microsoft\AndroidSDK\25", VS took licenses from there.

    0 讨论(0)
  • 2021-01-14 13:45

    In SDK folder you have to run under command prompt.

    ...\sdk\tools\bin
    

    Enter this command

    sdkmanager "platforms;android-26"
    
    0 讨论(0)
  • 2021-01-14 13:46

    os : windows 7 (64 bit)

    you can accept SDK lic agreement using blow command :

    goto the "C:\Users{user_name}\AppData\Local\Android\sdk\tools\bin"

    Execute command : sdkmanager "platforms;android-xx"

    node : xx is the version

    0 讨论(0)
  • 2021-01-14 13:55

    Solved! Reading the information on the page http://tools.android.com/tech-docs/new-build-system/license:

    ...

    If you have accepted the license agreements on one workstation, but wish to build your projects on a different one, you can export your licenses by copying the accepted licenses folder from the Android Sdk Home folder

    ...

    So I just went to C:\Android\sdk and copied the licenses folder to the C:\Android\android-sdk folder which was where Ionic was searching for the licenses.

    Thanks to all who have somehow tried to help.

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