Unable to build apk for project starting with a number



I am trying to build a project called 27coupons but when I run ionic build android the build fails with the below error

But if I create a project new27coupons and build the same code the build is successful. I tried with 3-4 other names starting with numbers. The build error occurs. But build is successful for projects starting with letters.

PS- My client has his product as 27coupons & I cannot change it.

Unable to build a project if the project name starts with a number

Your app is giving an error because any part of the package name cannot begin with a number. You need to change the package name to follow these guidelines. You can name the folder that holds your app whatever you would like, but you need to go into the config.xml and change the id from “com.ionicframework.27coupons” to something like “com.ionicframework.coupons27” or spell out the number in front.

You will need to remove the android platform and re-add it to the project in order for it to recognize the new package name. The package name is a unique identifier for the play store but it will still show the app title as 27coupons as long as the “name” tag in your config says that.

<widget id="com.ionicframework.coupons27" version="0.0.1" xmlns="http://www.w3.org/ns/widgets" xmlns:cdv="http://cordova.apache.org/ns/1.0">


Thanks . This worked :slight_smile: