Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

master: Resolve blank map when running compiled with latest cordova-android (which uses AGP 4.1.3) #1

Open
wants to merge 8 commits into
base: multiple_maps
Choose a base branch
from

Conversation

GitToTheHub
Copy link
Owner

Fix mapsplugin#2871

From AGP 4.1.+ assert keyword/statements are enabled by the compile through code rewrite.

Which is causing PluginMap to fail

The issue is caused by PluginMap being initialised 2 times. The 2nd time it is initialised, CordovaPlugin.privateInitialize has assert to prevent this.

This PR removes initialising the PluginMap in CordovaGoogleMaps.getMap, because when it is added to PluginManager it will be initialised then.

NOTE

Although the relevant code in PluginManager and CordovaPlugin has not been changed for many years.
The plugin's codebase works for older cordova-android versions because they use older AGP.

In these older versions, assert keyword/statement do nothing

@GitToTheHub GitToTheHub changed the title Resolve blank map when running compiled with latest cordova-android (which uses AGP 4.1.3) multiple_maps: Resolve blank map when running compiled with latest cordova-android (which uses AGP 4.1.3) Jun 10, 2024
@GitToTheHub GitToTheHub changed the title multiple_maps: Resolve blank map when running compiled with latest cordova-android (which uses AGP 4.1.3) master: Resolve blank map when running compiled with latest cordova-android (which uses AGP 4.1.3) Jun 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants