Hi guys,

I was getting this error when trying to generate a new .apk version.

Error: Failed to request mobile app generation for APP NAME (Android) - Internal Error: Unable to create application info zip file:
Internal Error: An item with the same key has already been added.
Details : System.ArgumentException: An item with the same key has already been added.
   at System.ThrowHelper.ThrowArgumentException(ExceptionResource resource)
   at System.Collections.Generic.Dictionary`2.Insert(TKey key, TValue value, Boolean add)
   at OutSystems.HubEdition.DeploymentController.Compiler.GetApplicationInfoZip(ICompilerContext context, String applicationKey, String eSpaceKey)

After some troubleshooting I found what made the error appear.

I was implementing this In App Purchases plugin (https://github.com/AlexDisler/cordova-plugin-inapppurchase) and it requires us to put in the www folder a "manifest.json" file. Having this in the eSpace resources and setting it ti be deployed to target directory, it causes the above error when building the .apk.

Do you know how to overcome this issue and why it's happening?



Hello Miguel.

The issue is happening because the manifest.json is clashing with an internal file required by the platform with the same name.

As a workaround, I would suggest you to fork the plugin and make it use a different name for that resource (e.g.: inapppurchase.json).



Thanks César! I got it working that way. And I'll share the plugin with the community soon.


Good to know.

Thanks for sharing the plugin.

Great work!