How to run my project Phonegap Cordova on a mobile with Android 2.3.6?

Asked

Viewed 956 times

3

Hello I am developing a game with Html5 and javascript as tcc. I’m using Cordova to generate versions for different platforms, I have several Androids to test the project, but I can only do it with the "Cordova run" command run the project in the Androids with version 4.1.2 or higher the detail is that I would need to run the project on mobile phones with android 2.3.6 as well. Some interesting points: - I use Ubuntu Linux 15.04 as the operating system. - I’ve researched the platform versions of Cordova I found some commands but it didn’t work.

1 answer

1

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

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 installed currently supports Android API 10 and higher, i.e., includes version 2.3.6):

$ sudo npm install -g [email protected]

See the version that 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

Do this, edit the file config.xml in the root folder of your project and change the preference android-minSdkVersion for 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" />
  • Ok, I installed an older version. But now how do I add the older version to the project I have?

  • I supplemented the answer.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.