https://build.phonegap.com given build error "app/src/main/res/xml/authenticator.xml:2: AAPT: error: resource mipmap/icon ( myAppId:mipmap/icon) not found"
See original GitHub issueHi,
I have use only one plugin that is “mauron85/cordova-plugin-background-geolocation” when buid it given error is “app/src/main/res/xml/authenticator.xml:2: AAPT: error: resource mipmap/icon (aka myAppId:mipmap/icon) not found”.
I have working on latest version phonegap thiat is <preference name="phonegap-version" value="cli-9.0.0" />
and plugins are :
<plugin name="cordova-plugin-whitelist" spec="1.3.3" /> <plugin name="cordova-plugin-statusbar" spec="2.4.2" /> <plugin name="cordova-plugin-device" spec="2.0.2" /> <plugin name="cordova-plugin-splashscreen" spec="5.0.2" /> <plugin name="cordova-plugin-ionic-webview" spec="^4.0.0" /> <plugin name="cordova-plugin-ionic-keyboard" spec="^2.0.5" /> <plugin name="@mauron85/cordova-plugin-background-geolocation"/> <engine name="android" spec="^8.1.0" />
how can I solve this issue please help me.
Issue Analytics
- State:
- Created 4 years ago
- Comments:6
Top GitHub Comments
For others that stumble on this error, here is some more info on what I was doing wrong in my Ionic/Angular project. When adding the
cordova-plugin-background-geolocation
plugin to my project, a file called authenticator.xml in /platforms/android/app/src/main/res/xml/ is updated to include a<account-authenticator>
node. This node has a number of properties based on the<cordova-plugin-background-geolocation>
plugin configuration in config.xml. Making changes to the config.xml will not be reflected in authenticator.xml unless you remove and re-add the plugin (see https://www.npmjs.com/package/@mauron85/cordova-plugin-background-geolocation).Note: The configuration needs to be defined in config.xml before you add the plugin. Removing the plugin will remove the configuration in config.xml.
In my case, my icons were named ic_launcher.png (not icon.png), so in my config.xml file I had to configure the icon settings accordingly.
> cordova plugin remove cordova-plugin-background-geolocation
> ionic cordova plugin add cordova-plugin-background-geolocation
I guess as an alternative, you could modify the authenticator.xml file or manually add icon.png to your resources but I see these more as a hack than a robust solution.
This issue has been automatically closed, because it has not had recent activity. If you believe this issue shouldn’t be closed, please reopen or write down a comment requesting issue reopening with explanation why you think it’s important. Thank you for your contributions.