Generate apk cordova

1

When I generate the apk with cordova

I add the android platform

cordova platform add android

then I build the application

cordova build android

The application is generated.

But how do I know if I'm taking sdk (if I install several in my sdk). ?

    
asked by CesarG 26.02.2018 в 17:42
source

3 answers

1

First you need to know the following definitions:

  

minSdkVersion : indicates from what API your application is   supported.

     

maxSdkVersion : indicates up what API version your application   it is supported.

     

targetSdkVersion indicates that API your application is   compiled, Integer value that designates the level of API to which it is directed   the application. If it is not configured, the default value is equal to   value assigned to the minSdkVersion.

Now to know the version when the project is generated:

$ cordova platform add android
$ cordova build android

check inside the file

platforms/android/AndroidManifest.xml

or for Cordova Android 7.0.0 within :

app/src/main/AndroidManifest.xml.

there you will find the properties mentioned above.

These values can be overwritten within the file config.xml you can define the version define the minimum SDK to use and the target with which your application will be created.

<platform name="android">
    <preference name="android-minSdkVersion" value="16" />
    <preference name="android-targetSdkVersion" value="26" />
</platform>
    
answered by 27.02.2018 / 02:34
source
1

You can check this in the file:

platforms/android/AndroidManifest.xml

Which is generated at the moment of executing the command. You can find the version specifically in the lines:

android:minSdkVersion="10" android:targetSdkVersion="19"

If you need to modify the android version you can run the cordova platform add android command specifying the x version as follows:

cordova platform add [email protected]

Greetings.

    
answered by 26.02.2018 в 21:56
1

You can find it in the file AndroidManifest.xml , in my case I have it located in the path "platforms / android / AndroidManifest.xml", you are looking for the following:

    <uses-sdk android:minSdkVersion="16" android:targetSdkVersion="25" />

Or you can search your config.xml file

    <preference name="android-minSdkVersion" value="16" />

I hope it serves you!

    
answered by 27.02.2018 в 02:42