What platform are you building for?
Android
What framework are you building with?
Cordova
What is your build ID?
6c5e965d-745e-4e5d-b070-c02332a1fb50
What is your error message?
UserError: Android app id ‘com.lion-ridge.LR-Sel’: each segment may only contain letters, digits, or underscores.
Please describe the issue:
I have built this app for Android numerous times, but this is a new error. If I change the app id, this will screw my ios builds. Is there a separate config.xml parameter for android app id?
Yes, you can add an android-packageName attribute to the widget tag.
Thanks for your response, I’ll try that and get back to you if it doesn’t fix it, otherwise I’ll close the case
Turns out I’ve already got that tag and it fulfils the criteria i.e. no characters other than letters and underscores. Shall I send my config.xml file?
That would be helpful - thank you!
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.lion-ridge.LR-Sel" ios-CFBundleVersion="2.22" version="2.22"
xmlns="http://www.w3.org/ns/widgets"
xmlns:cdv="http://cordova.apache.org/ns/1.0"
xmlns:gap="http://phonegap.com/ns/1.0"
android-packageName="com.lionridge.lrsel">
<name>LR-Sel</name>
<description>
Simplified version of LionRidge for small format devices - this version deals with Selection solutions only
</description>
<author email="brian.preece@lion-ridge.com" href="">
Brian Preece, LionRidge Ltd
</author>
<engine name="ios" spec="7.1.1" />
<content src="index.html" />
<access origin="https://lion-ridge.net" />
<allow-intent href="https://lion-ridge.net/*" />
<access origin="http://www.lion-ridge.info/*" />
<allow-intent href="http://www.lion-ridge.info/*" />
<!-- <allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" /> -->
<icon src="icon.png" />
<splash src="splashscreen.png" />
<preference name="Orientation" value="portrait" />
<config-file target="AndroidManifest.xml" parent="/*" mode="merge">
<uses-permission android:name="android.permission.CAMERA" />
<uses-permission android:name="android.permission.INTERNET" />
<!--<uses-feature android:name="android.hardware.camera" />
<uses-feature android:name="android.hardware.camera.autofocus" />-->
</config-file>
<platform name="android">
<engine name="android" spec="13.0.0" />
<edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application">
<application android:usesCleartextTraffic="true" />
</edit-config>
<preference name="AndroidXEnabled" value="true" />
<preference name="android-targetSdkVersion" value="35" />
<preference name="AndroidPersistentFileLocation" value="Compatibility" />
<preference name="android-build-tool" value="gradle" />
<allow-intent href="market:*" />
<preference name="splashScreenDelay" value="2000" />
<preference name="AutoHideSplashScreen" value="true" />
<preference name="AndroidWindowSplashScreenAnimatedIcon" value="resources/splashTemplate.png" />
<preference name="AndroidWindowSplashScreenBackground" value="#000000" />
</platform>
<platform name="ios">
<!--<preference name="WKWebViewOnly" value="true" />
<feature name="CDVWKWebViewEngine">
<param name="ios-package" value="CDVWKWebViewEngine" />
</feature>
<preference name="CordovaWebViewEngine" value="CDVWKWebViewEngine" />-->
<preference name="scheme" value="app" />
<preference name="hostname" value="localhost" />
<preference name="target-device" value="handset" />
<icon height="20" src="www/icons/Icon20x20.png" width="20" />
<icon height="40" src="www/icons/Icon40x40.png" width="40" />
<icon height="180" src="www/icons/Icon180x180.png" width="180" />
<icon height="80" src="www/icons/Logo_80x80.png" width="80" />
<icon height="120" src="www/icons/Icon120x120.png" width="120" />
<icon height="1024" src="www/icons/Logo_1024x1024.png" width="1024" />
<splash height="2436" src="www/icons/SplashScreen1125x2436.png" width="1125" />
<splash height="1136" src="www/icons/SplashScreen640x1136.png" width="640" />
<splash height="1334" src="www/icons/SplashScreen750x1334.png" width="750" />
<splash height="2208" src="www/icons/SplashScreen1242x2208.png" width="1242" />
<allow-intent href="itms:*" />
<allow-intent href="itms-apps:*" />
<!-- <edit-config target="NSLocationAlwaysUsageDescription" file="*-Info.plist" mode="overwrite">
<string>Location not used by LionRidge</string>
</edit-config>
<edit-config target="NSLocationWhenInUseUsageDescription" file="*-Info.plist" mode="overwrite">
<string>Location not used by LionRidge</string>
</edit-config>-->
<edit-config target="NSCameraUsageDescription" file="*-Info.plist" mode="overwrite">
<string>Camera only used for bar code reading when selecting an alternate server</string>
</edit-config>
<edit-config target="NSPhotoLibraryUsageDescription" file="*-Info.plist" mode="overwrite">
<string>Photo library not used by LionRidge</string>
</edit-config>
</platform>
<!--<plugin name="cordova-plugin-camera">
<variable name="CAMERA_USAGE_DESCRIPTION" value="Used for bar code scanning only" />
<variable name="PHOTOLIBRARY_USAGE_DESCRIPTION" value="Not used" />
</plugin>-->
<plugin name="cordova-plugin-dialogs">
<variable name="CAMERA_USAGE_DESCRIPTION" value="Used for bar code scanning only" />
<variable name="PHOTOLIBRARY_USAGE_DESCRIPTION" value="Not used" />
</plugin>
<plugin name="cordova-plugin-file">
</plugin>
<!-- <plugin name="cordova-plugin-geolocation">
<variable name="GEOLOCATION_USAGE_DESCRIPTION" value="Not used" />
</plugin>-->
<plugin name="phonegap-plugin-barcodescanner-android12" />
<plugin name="cordova-plugin-globalization">
</plugin>
<plugin name="cordova-plugin-inappbrowser">
</plugin>
<plugin name="cordova-plugin-splashscreen">
</plugin>
<plugin name="cordova-plugin-statusbar">
</plugin>
<plugin name="cordova-plugin-device">
</plugin>
<plugin name="cordova-plugin-vibration">
</plugin>
<!-- <plugin name="cordova-plugin-file-opener2">
</plugin>-->
<plugin name="cordova-plugin-document-viewer">
</plugin>
<plugin name="cordova-android-support-gradle-release">
<!--<variable name="ANDROID_SUPPORT_VERSION" value="6.5" />-->
</plugin>
<plugin name="cordova-plugin-androidx-adapter" />
<access origin="*" />
<allow-intent href="*" />
<allow-navigation href="*" />
<allow-navigation href="file:*" />
</widget>
Try swapping your id and android-packageName - the ID is the one that we/cordova check. the android-packageName is the one used for Android and Google Play.
so you mean
<widget id="com.lionridge.LRSel" ios-CFBundleVersion="2.22" version="2.22"
xmlns="http://www.w3.org/ns/widgets"
xmlns:cdv="http://cordova.apache.org/ns/1.0"
xmlns:gap="http://phonegap.com/ns/1.0"
android-packageName="com.lion-ridge.lr-sel">
Isn’t the id used by the iOS App Store and has to match the id in the profile?
The id attribute is the default attribute used for package name by iOS and Android. It can be overridden in a platform specific way by using the following attributes:
android-packageName - override the ID for Android
ios-CFBundleIdentifier - override the ID for iOS
Is your app already uploaded to the Google Play store? If so, using what ID?
p.s. You can paste in a code block by surrounding it with three backticks, like so:
```
// Here is some code
```
Our forum uses markdown for formatting - more info can be found here: Markdown Guide
Thanks for the hints.
Yes, the app is already uploaded using the id com.lionridge.lrsel, which is what my config.xml file has under android-packagename, so this config.xml file has worked in the past - evidently Google has changed something since it was last uploaded. I’ll try changing the id and using ios-CFBundleIdentifier for iOS. Will get back to you when I’ve tried both builds