Cordova Build Android Error


An update of Android Studio requires me to move Android SDKs out of the Application folder.


After I moved it, I got the following error when I do “cordova build android”

/Users/Henry/android-sdks/tools/ant/build.xml:483: The SDK Build Tools revision (18.0.1) is too low for project 'CordovaApp'. Minimum required is 19.1.0


I launch Android SDK Manager from Android Studio and it turns out that SDK Manager is still look at the old SDK Path, the one in the Application folder.


  1. Launch Android Studio
  2. On the right panel, select Configure –> Project Defaults –> Project Structure
  3. Specify the correct Android SDK location and click OK.
  4. Go back and select Configure –> SDK Manager.
  5. Verify that SDK Manager has the correct SDK Path. 
  6. Install the latest (i.e. highest Rev.) Android SDK Build-tools



How to Dynamically Create Mobile Touch Shortcut Icon for Apple iOS and Android


Say your website has 2 users, each has a different avatar icon.  You want the user to be able to create a mobile touch / shortcut / favorite icon on their Apple iOS / Android device / Desktop.  It isn’t really a bookmark icon.


You need to create the icon of the right sizes and add the following to the head section of the HTML:

<meta name="mobile-web-app-capable" content="yes">
<link href="" rel="apple-touch-icon" sizes="76x76" />
<link href="" rel="apple-touch-icon" sizes="120x120" />
<link href="" rel="apple-touch-icon" sizes="152x152" />
<link href="" rel="shortcut icon" sizes="128x128" />
<link href="" rel="shortcut icon" sizes="196x196" />

Note that you have the flexibility of specifying both the url and image filename.

Here is a sample code for ASP.NET to generate the above <link> HTML:

protected void Page_Init(object sender, EventArgs e)
#region shortcut icons for iOS
AddTouchIcon(76, "apple-touch-icon");
AddTouchIcon(120, "apple-touch-icon");
AddTouchIcon(152, "apple-touch-icon");

#region shortcut icons for Android
AddTouchIcon(128, "shortcut icon");
AddTouchIcon(196, "shortcut icon");

private void AddTouchIcon(int size, string rel)
HtmlLink myHtmlLink = new HtmlLink();

myHtmlLink.Href = string.Format("~/Images/B{0}-{1}x{1}.png", CurrentUser.BranchID, size);
myHtmlLink.Attributes.Add("rel", rel);

switch (size)
case 76:
case 120:
case 128:
case 152:
case 196:
myHtmlLink.Attributes.Add("sizes", string.Format("{0}x{0}", size));


Don’t forget the <meta> tag for Android Chrome.

Of course you need to create and store those different images as well.


Note that creating the shortcut is both OS and browser dependent.  On iOS (iPad and iPhone), I had to use Safari.  I could not get Chrome to do it. 

On Android (Samsung Note 3), we had to use Chrome to create the shortcut to the home page.

On PC desktop, I used Chrome to create a shortcut.  Note that it is NOT the same as bookmark.