Cordova Android build fails with the message "Ant command failed"

Solution Verified - Updated -

Issue

  • When building a Cordova app for Android, the build fails and the studio presents the following error:

    [Ant command failed]
    
  • If the app name starts with a number, further investigation of the logs by the operations team will result in finding an error similar to the following:

    [javac] /... /project/platforms/android/src/com/feedhenry/fh123Test/123Test.java:25: <identifier> expected
    [javac] public class 123Test extends CordovaActivity 
    

Environment

  • Red Hat Mobile Application Platform ( RHMAP ) 3
  • Cordova
  • Android

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content