How can the apk created phonegap work on all versions of android

56 views
Skip to first unread message

Anderson Araujo

unread,
Feb 28, 2015, 6:01:59 PM2/28/15
to phon...@googlegroups.com
I create the apk but it only works in versions 4.4 of Android I want it to work at all from the 2.3
Someone here could help me? : /

mharr

unread,
Mar 1, 2015, 10:41:00 AM3/1/15
to phon...@googlegroups.com
Make sure your project root config.xml has the following line:

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

If you are using CLI, I could be wrong (I get confused on which settings get re-merged and which do not using CLI), but I think if you change this, you need to wipe out the platforms/android project and re-build it using cordova build android command.  If using PhoneGap Build, I don't think there is an issue.

Raju Shetty

unread,
Dec 22, 2015, 10:14:45 AM12/22/15
to phonegap
What do you mean by saying wipe out the platforms/android project  ?  I've similar problem. I'm using phone gap build yet unable to use my App on Jelly bean version or below 4.3 version.. 

I've this in my config file 
<preference name="android-minSdkVersion" value="14"/>

I changed the value to 10 yet no use! 

If remove the code for platforms PhoneGap build is not building Apk 

<platform name="android">
    <allow-intent href="market:*"/>
  </platform>

Please Help

jcesarmobile

unread,
Dec 22, 2015, 10:55:44 AM12/22/15
to phonegap
Latest version of cordova android supports android 4.0.0 and greater (SDK 14)
If you want to compile for SDK 10 you should use a previous version of cordova android (4.0.2 or older)

Appsotutely

unread,
Dec 23, 2015, 7:20:13 PM12/23/15
to phonegap
Raju, "wipe out the platforms/android project" doesn't apply to you if you are using only Phonegap Build.


What do you have set for both minSdkVersion and targetSdkVersion?

Also, is your application actually running in higher level versions like KitKat or Lollipop or have you only been trying to test with JellyBean or lower?  Does you application run in an emulator?  If it is working in a higher level version, but not a lower level version, are you possibly using features that only exist in the higher level versions?
Reply all
Reply to author
Forward
0 new messages