Hello,
I’m a paying customer and I’m running into issues building my AAB for Android 12.
Pasted below is the relevant part of the config.xml file.
<platform name="android">
<engine name="android" spec="11.0.0" />
<edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application/activity">
<application android:exported="true" />
</edit-config>
<preference name="SplashMaintainAspectRatio" value="true"/>
<preference name="SplashShowOnlyFirstTime" value="true"/>
<icon density="ldpi" src="res/android/ldpi.png"/>
<icon density="mdpi" src="res/android/mdpi.png"/>
<icon density="hdpi" src="res/android/hdpi.png"/>
<icon density="xhdpi" src="res/android/xhdpi.png"/>
<icon density="xxhdpi" src="res/android/xxhdpi.png"/>
<icon density="xxxhdpi" src="res/android/xxxhdpi.png"/>
<!-- Portrait -->
<splash density="port-ldpi" src="res/android/splash-port-ldpi.png"/>
<splash density="port-mdpi" src="res/android/splash-port-mdpi.png"/>
<splash density="port-hdpi" src="res/android/splash-port-hdpi.png"/>
<splash density="port-xhdpi" src="res/android/splash-port-xhdpi.png"/>
<splash density="port-xxhdpi" src="res/android/splash-port-xxhdpi.png"/>
<splash density="port-xxxhdpi" src="res/android/splash-port-xxxhdpi.png"/>
</platform>
I tried to follow your instructions as per Building for Android 12 | VoltBuilder
But I get an error building it:
UserError: Parse Error in config.xml: unbound prefix: line 120, column 4
Can you help please?
Thanks in advance.
ghenne
3
Looking at the log, I see this a few lines up:
<edit-config file="*-Info.plist" mode="merge" target="UIViewControllerBasedStatusBarAppearance"><false /></edit-config>
The <false />
could be a problem.
This is the problematic line
<application android:exported="true" />
Removed the line, same issue. I will post the almost complete config here with some changed strings for privacy.
<?xml version='1.0' encoding='utf-8'?>
<widget id="com.dev.appid" version="0.52" xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0">
<preference name="phonegap-version" value="cli-9.0.0" />
<name>Name Text</name>
<description>
Description Text
</description>
<author email="test@test.com" href="http://www.test.com">
Author Name
</author>
<content src="index.html" />
<access origin="*" />
<platform name="android">
<access origin="market:*" launch-external="yes"/>
<access origin="tel:*" launch-external="yes"/>
<access origin="geo:*" launch-external="yes"/>
<access origin="mailto:*" launch-external="yes"/>
<access origin="sms:*" launch-external="yes"/>
<access origin="whatsapp:*" launch-external="yes"/>
<access origin="line:*" launch-external="yes"/>
<access origin="twitter:*" launch-external="yes"/>
<access origin="fb:*" launch-external="yes"/>
<access origin="fbapi20130214:*" launch-external="yes"/>
<access origin="skype:*" launch-external="yes"/>
</platform>
<!-- Navigation Whitelist -->
<allow-navigation href="http://*/*" />
<allow-navigation href="https://*/*" />
<allow-navigation href="data:*" />
<allow-navigation href="file:*" />
<allow-navigation href="http://localhost:8080/*"/>
<!-- Intent Whitelist -->
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<allow-intent href="rtsp://*" />
<allow-intent href="rtmp://*" />
<allow-intent href="rtp://*" />
<allow-intent href="udp://*" />
<allow-intent href="file://*" />
<allow-intent href="tel:*" />
<allow-intent href="sms:*" />
<allow-intent href="mms:*" />
<allow-intent href="mailto:*" />
<allow-intent href="geo:*" />
<allow-intent href="google.navigation:*" />
<allow-intent href="google.streetview:*" />
<allow-intent href="maps:*" />
<allow-intent href="map:*" />
<allow-intent href="googlemap:*" />
<allow-intent href="whatsapp:*" />
<allow-intent href="line:*" />
<allow-intent href="twitter:*" />
<allow-intent href="fb:*" />
<allow-intent href="fbapi20130214:*" />
<allow-intent href="skype:*" />
<allow-intent href="linkedin:*" />
<allow-intent href="googlegmail:*" />
<allow-intent href="youtube:*" />
<platform name="android">
<allow-intent href="market:*" />
</platform>
<platform name="ios">
<allow-intent href="itms:*" />
<allow-intent href="itms-apps:*" />
<preference name="WKWebViewOnly" value="true" />
<feature name="CDVWKWebViewEngine">
<param name="ios-package" value="CDVWKWebViewEngine" />
</feature>
<preference name="CordovaWebViewEngine" value="CDVWKWebViewEngine" />
</platform>
<preference name="android-minSdkVersion" value="22" />
<preference name="android-targetSdkVersion" value="31" />
<plugin name="cordova-plugin-splashscreen"/>
<plugin name="cordova-plugin-whitelist" />
<plugin name="cordova-plugin-geolocation" />
<plugin name="cordova-plugin-statusbar"/>
<plugin name="cordova-plugin-dialogs"/>
<plugin name="cordova-plugin-device" />
<plugin name="cordova-plugin-network-information"/>
<plugin name="cordova-plugin-inappbrowser" />
<plugin name="cordova-plugin-sim" />
<plugin name="cordova-plugin-ionic-webview" />
<plugin name="onesignal-cordova-plugin"/>
<platform name="ios">
<icon src="res/ios/icon-1024.png" width="1024" height="1024"/>
<icon src="res/ios/icon-small.png" width="29" height="29"/>
<icon src="res/ios/icon-small@2x.png" width="58" height="58"/>
<icon src="res/ios/icon-small@3x.png" width="87" height="87"/>
<icon src="res/ios/icon-small-40.png" width="40" height="40"/>
<icon src="res/ios/icon-small-40@2x.png" width="80" height="80"/>
<icon src="res/ios/icon-small-40@3x.png" width="120" height="120"/>
<icon src="res/ios/icon-small-50.png" width="50" height="50"/>
<icon src="res/ios/icon-small-50@2x.png" width="100" height="100"/>
<icon src="res/ios/icon.png" width="57" height="57"/>
<icon src="res/ios/icon@2x.png" width="114" height="114"/>
<icon src="res/ios/icon-60.png" width="60" height="60"/>
<icon src="res/ios/icon-60@2x.png" width="120" height="120"/>
<icon src="res/ios/icon-60@3x.png" width="180" height="180"/>
<icon src="res/ios/icon-72.png" width="72" height="72"/>
<icon src="res/ios/icon-72@2x.png" width="144" height="144"/>
<icon src="res/ios/icon-76.png" width="76" height="76"/>
<icon src="res/ios/icon-76@2x.png" width="152" height="152"/>
<icon src="res/ios/icon-167.png" width="167" height="167"/>
<icon src="res/ios/icon-83.5@2x.png" width="167" height="167"/>
<!-- Storyboard portrait -->
<splash src="res/ios/Default@2x~iphone~anyany.png"/>
<splash src="res/ios/Default@2x~iphone~comany.png"/>
<splash src="res/ios/Default@3x~iphone~anyany.png"/>
<splash src="res/ios/Default@3x~iphone~comany.png"/>
<splash src="res/ios/Default@2x~ipad~anyany.png"/>
<splash src="res/ios/Default@2x~ipad~comany.png"/>
<edit-config file="*-Info.plist" mode="merge" target="NSLocationWhenInUseUsageDescription"><string>Geo warning text</string></edit-config>
<edit-config file="*-Info.plist" mode="merge" target="NSLocationAlwaysUsageDescription"><string>Geo warning text</string></edit-config>
<edit-config file="*-Info.plist" mode="merge" target="UIStatusBarHidden"><true /></edit-config>
<edit-config file="*-Info.plist" mode="merge" target="UIViewControllerBasedStatusBarAppearance"></edit-config>
</platform>
<platform name="android">
<engine name="android" spec="11.0.0" />
<edit-config file="app/src/main/AndroidManifest.xml" mode="merge" target="/manifest/application/activity">
<application android:exported="true" />
</edit-config>
<preference name="SplashMaintainAspectRatio" value="true"/>
<preference name="SplashShowOnlyFirstTime" value="true"/>
<icon density="ldpi" src="res/android/ldpi.png"/>
<icon density="mdpi" src="res/android/mdpi.png"/>
<icon density="hdpi" src="res/android/hdpi.png"/>
<icon density="xhdpi" src="res/android/xhdpi.png"/>
<icon density="xxhdpi" src="res/android/xxhdpi.png"/>
<icon density="xxxhdpi" src="res/android/xxxhdpi.png"/>
<!-- Portrait -->
<splash density="port-ldpi" src="res/android/splash-port-ldpi.png"/>
<splash density="port-mdpi" src="res/android/splash-port-mdpi.png"/>
<splash density="port-hdpi" src="res/android/splash-port-hdpi.png"/>
<splash density="port-xhdpi" src="res/android/splash-port-xhdpi.png"/>
<splash density="port-xxhdpi" src="res/android/splash-port-xxhdpi.png"/>
<splash density="port-xxxhdpi" src="res/android/splash-port-xxxhdpi.png"/>
</platform>
<preference name="UIWebViewBounce" value="false" />
<preference name="DisallowOverscroll" value="true" />
<preference name="orientation" value="portrait" />
<preference name="SplashScreenDelay" value="3000" />
<preference name="AndroidXEnabled" value="true" />
<icon src="icon.png" />
<splash src="splash.png" />
</widget>
ghenne
6
Found the problem.
First, this line has nothing to do with it:
<edit-config file="*-Info.plist" mode="merge" target="UIViewControllerBasedStatusBarAppearance"><false /></edit-config>
so put that back as it was.
The problem is in the second line of your file:
<widget id="com.dev.appid" version="0.52" xmlns="http://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0">
It should be
<widget id="com.dev.appid" version="0.52" xmlns="https://www.w3.org/ns/widgets" xmlns:gap="http://phonegap.com/ns/1.0">
Notice the change from http
to https
?
Since it was not doing a secure read of the xmlns rules, it was not able to parse properly.
Hello,
This fixed it for me. Thanks.