Ionic add android android with custom android target

Does anyone know how to add a platform to ionic with a custom Android purpose? If I try this command:

ion platform add android

He always adds the Android platform with the latest Android platform, does anyone know how to configure the target Android system without changing the manifest and custom platform, add the Android version.

+5
source share
2 answers

To change the build version, you want to change your config.xml file located in the root path of the project.

The following lines are added to config.xml, and then the settings are updated automatically when you create an Android application.

<platform name="android"> <preference name="android-minSdkVersion" value="XX"/> <preference name="android-targetSdkVersion" value="XX"/> <!--other line code --> </platform> 

Hope this helps you!

+12
source

You should be able to see all versions of the platforms installed in your project with:

 cordova platform list 

Then you can delete the current version with:

 cordova platform remove android 

And install the version you need: (in my case 6.1.1)

 cordova platform add android@6.1.1 

Source: cordova.apache.org documentation

+4
source

Source: https://habr.com/ru/post/1243647/


All Articles