Cordova : [Error: Please install Android target: “android-21”

后端 未结 9 634
梦毁少年i
梦毁少年i 2020-12-04 11:50

I just updated cordova + ionic in my app, after that i installed successfully Android-SDK v22 via Android SDK manager.

But after the running command:



        
相关标签:
9条回答
  • 2020-12-04 12:49

    I just had the same problem. I had to change the target:

    # Project target.
    target=android-22
    

    This should be done in two files:

    myApp/platforms/android/project.properties myApp/platforms/android/CordovaLib/project.properties

    Also the manifest should be updated:

    <uses-sdk android:minSdkVersion="14" android:targetSdkVersion="22" />
    
    0 讨论(0)
  • 2020-12-04 12:52

    another way to fulfill an android target requirement would be:

    $sdkmanager "platforms;android-21"
    
    0 讨论(0)
  • 2020-12-04 12:54

    For those who run Visual Studio and have Mobile Development with JavaScript installed, you can run C:\ProgramData\Microsoft\AndroidSDK\25\tools\android.BAT and then proceed to install Android 5.0.1 or the relevant API.

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