How to run my Phonegap Cordova project on an Android 2.3.6 phone?

Question:

Hi I'm developing a game with html5 and javascript like tcc. I'm using cordova to generate versions for different platforms, I have several android devices to test the project, but with the command "cordova run" I can only run the project on androids with version 4.1.2 or higher. project on android 2.3.6 phones as well. Some interesting points: – I use linux Ubuntu 15.04 as operating system. – I already researched about the versions of the platforms of cordova I found some commands but they didn't work.

Answer:

The latest version of Cordova does not support Android 2.3.6 as it is a version that is currently installed on less than 5% of Android devices:

Cordova supports Android 4.0.x (starting with Android API level 14) and higher. As a general rule, Android versions become unsupported by Cordova as they dip below 5% on Google's distribution dashboard. Android versions earlier than API level 10, and the 3.x versions (Honeycomb, API levels 11-13) fall significantly below that 5% threshold. http://cordova.apache.org/docs/en/5.0.0/guide_platforms_android_index.md.html#Android%20Platform%20Guide

You can try to solve this by installing an older version of Cordova (for example, the version I have currently installed supports Android API 10 and up, ie includes version 2.3.6):

$ sudo npm install -g cordova@5.1.1

See which version is currently installed:

$ sudo cordova -v

More details on how to install a specific version: http://cordova.apache.org/docs/en/5.0.0/guide_cli_index.md.html#The%20Command-Line%20Interface

Once that's done, edit the config.xml file in your project's root folder and change the android-minSdkVersion preference to the minimum API value supported by the downloaded version of Cordova. In other words, change this line:

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

for this:

<preference name="android-minSdkVersion" value="10" />
Scroll to Top