ionic add platform android with custom android-target

Redturbo picture Redturbo · Feb 23, 2016 · Viewed 55.5k times · Source

Anybody knows how to add platform in ionic with custom android target ? If I try this command :

ionic platform add android

It always add android platform with newest android-target platform, anybody knows how to custom the android target without edit the manifest and custom platform add android version ?

Answer

Santosh Shinde picture Santosh Shinde · Feb 23, 2016

To change the build version you want change your config.xml located at the root project's path.

Following lines add in config.xml and then settings are updated automatically at the time building android app.

<platform name="android">

  <preference name="android-minSdkVersion" value="XX"/> 
  <preference name="android-targetSdkVersion" value="XX"/>

  <!--other line code -->

</platform>

For Ionic2 please check my gist to here.

Hope this will help you !