4

I am creating a new Cordova project. And after i have created the project, When i try to add platform using the command

cordova platform add android

i get the result

Adding android project...
Creating Cordova project for the Android platform:
Path: platforms\android
Package: com.gofindy.android
Name: GofindyApp
Activity: MainActivity
Android target: android-22
Copying template files...
Android project created with cordova-android@4.0.0
Installing "cordova-plugin-whitelist" for android

Even though i have deleted android api22 its still creating android target:android-22

How can I change that android target to android-19 when adding android platform

i have tried this (dding two lines specifying sdk version) :
Config.xml :

<?xml version='1.0' encoding='utf-8'?>
<widget id="com.gofindy.android" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">
  <name>GofindyApp</name>
  <description>
    A sample Apache Cordova application that responds to the deviceready event.
  </description>
  <author email="dev@cordova.apache.org" href="http://cordova.io">
    Apache Cordova Team
  </author>

  <preference name="android-minSdkVersion" value="16"/>  //added by me
  <preference name="android-targetSdkVersion" value="19"/> //added by me

  <content src="index.html" />
  <plugin name="cordova-plugin-whitelist" version="1" />
  <access origin="*" />
  <allow-intent href="http://*/*" />
  <allow-intent href="https://*/*" />
  <allow-intent href="tel:*" />
  <allow-intent href="sms:*" />
  <allow-intent href="mailto:*" />
  <allow-intent href="geo:*" />
  <platform name="android">
    <allow-intent href="market:*" />
    <preference name="android-targetSdkVersion" value="19 " />
  </platform>
  <platform name="ios">
    <allow-intent href="itms:*" />
    <allow-intent href="itms-apps:*" />
  </platform>
</widget>

but still when i create a project and add android platform.it says
Andorid target:android-22
even though the android manifest has reflected the change.

  • Did you manage to fix it? I have the same problem... – Yossale Jul 22 '15 at 14:56
  • This answer here says to try to use a lesser version of Cordova: http://stackoverflow.com/questions/30028483/cordova-build-please-install-android-target-android-22-i-dont-want-android?rq=1 – Mike Randall Aug 19 '15 at 19:49

0 Answers0