Error generating Android Build

Hello,

I am trying to generate native Android debug build and received following error:

"In Android on 2020-01-13 at 19:05:27 - Error generating application. Library :CordovaLib requires minimum Android SDK 21, which is higher than the 15 that is required by the application. Check if this value is being overriden in your Extensibility Configurations."

I have not added any SDK version in Extensibility Configurations. Can anyone help to resolve this error.

Thank you.

Hey Hemlata,


Please add this in your module Extensibility Configuration


"preferences":
        {
            "android":
            [
           
                {
                    "name":"android-targetSdkVersion",
                    "value":"28"
                }
            ]
       
        }



Thanks,

Keerthi

Hi Keerthi,

I have tried the same but still getting the above shared error. My Extensibility Configuration looks like the below image.


Thanks.

Solution

Hi Hemlata khajanchi,

The error says for Minimum SDK not for Targeted one.

Do update the minimum SDK version for your app in the Extended properties.

sample : 

{
    "preferences": {
        "android": [{
            "name": "android-minSdkVersion",
            "value": "21"
        }]
    }
}


Hope it helps,

Assif

Solution

Hey Hemlata,


Try with assif suggestion, I hope that will work.


The actual issue is with the Plugin (Facebook) that you have integrated 

https://github.com/premedios/cordova-plugin-facebook4/blob/master/plugin.xml




Thanks,

Keerthi

Hi Aasif,

Thanks for the solution, It works now.

Hemlata khajanchi wrote:

Hi Aasif,

Thanks for the solution, It works now.

Happy to know,

Cheers :)

Assif