Cordova build: Please install Android target: “android-22”. I dont want android-22. I want android-19 - what do i do?

后端 未结 7 1436
清酒与你
清酒与你 2020-12-01 09:56

I\'m struggling with my phonegap setup and building my first app.

I created a hello1 project. I added the android project

Platform android al

相关标签:
7条回答
  • 2020-12-01 10:08

    Just reopening the command line fixed it.

    0 讨论(0)
  • 2020-12-01 10:15
    $ cordova platforms remove android
    $ cordova platforms add android@3.7.1
    
    0 讨论(0)
  • 2020-12-01 10:19

    I am using cordova 3.5.0 which by default has target sdk as 19. You can install cordova 3.5.0 using

    npm install -g cordova@3.5.0-0.2.6
    

    For other versions of Cordova if you want to manually edit it you have to change this in AndroidManifest.xml file present in yourapplication/platfomrs/android.

    <uses-sdk android:minSdkVersion="14" android:targetSdkVersion="19" />
    
    0 讨论(0)
  • 2020-12-01 10:21

    Steps:

    • $ /Users/username/Library/Android/sdk/tools/android
    • Install Android 5.1.1 (API 22)
    • $ cordova platforms add android@4.4.2
    • $ cordova build --release android

    It works for me.

    0 讨论(0)
  • 2020-12-01 10:28

    My problem got solved after installing SDK Platform of Andriod 5.1.1 (API 22) from Andriod Manager.

    0 讨论(0)
  • 2020-12-01 10:30

    Change these two. I din't try it for lower versions but this worked for me in upper versions

    target=android-22<br>
    

    This should be changed in two files like below:

    target=android-19<br>
    

    Location of the two files:

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

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