How to set cordova to android target API 21

11,135

Solution 1

As you say it doesn't react at all to changes in the manifest, you have to manually add a tag specifying the minimum sdk in the config.xml located in the project root folder.

preference name="android-minSdkVersion" value="16"

Note that this will only work if you have updated to a Cordova version which supports the target sdk.

It is all answered here: Changing the android target of a cordova project

Solution 2

With Cordova 3.5.something started to go wrong to set Cordova to android target API 21 this can be used:

<platform name="android">
    <preference name="android-minSdkVersion" value="21" />
</platform>

The advantage is that now you can delete the android platform and recreate it without losing any setting.

Share:
11,135

Related videos on Youtube

Dinkheller
Author by

Dinkheller

Having used ExtJS since 2010 as well as being part of the Sencha team in 2017/18 and working for all sizes of companies (e.g. Mercedes Benz Bank, Deutsche Telekom) I am currently looking for a fix job / freelance job in web-app / hybrid-app development. I offer frontend programming for all devices (including Cordova) App Projects: Peek &amp; Cloppenburg: eCommerce Hybrid App Shop Telekom: Hybrid App for WebRTC telephonie (lots of Android plugins) Congstar: Telecomunication end customer platform SAP: business management system FestTool: tools market. Mercedes Benz: Customer Service App Mercedes Benz Bank: WebApp calculator

Updated on September 16, 2022

Comments

  • Dinkheller
    Dinkheller over 1 year

    how can I set the minimum and target SDK version to 21? So far I changed it inside the Android Manifest, but still the build process shows android SDK level 19.

    Thanks