You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Android] When app is compiled with AGP 4.1.3 ('com.android.tools.build:gradle:4.1.3'), the map is blank #2871
Cause
I've done some investigation and have isolated the issue to be caused by the change in cordova-android dependency of AGP from version 4.0.x to 4.1.3
Related code, data or error log (please format your code or data):
Most the time no errors in logcat
Occasionally the following error is shown in logcat
java.lang.AssertionError
at org.apache.cordova.CordovaPlugin.privateInitialize(CordovaPlugin.java:52)
at org.apache.cordova.PluginManager.getPlugin(PluginManager.java:178)
at org.apache.cordova.PluginManager.exec(PluginManager.java:129)
at org.apache.cordova.CordovaBridge.jsExec(CordovaBridge.java:59)
at org.apache.cordova.engine.SystemExposedJsApi.exec(SystemExposedJsApi.java:41)
at android.os.MessageQueue.nativePollOnce(Native Method)
at android.os.MessageQueue.next(MessageQueue.java:326)
at android.os.Looper.loop(Looper.java:160)
at android.os.HandlerThread.run(HandlerThread.java:65)
You will need to edit config.xml to put in your Map API key
Please share your project files on Github or others(Bitbucket, Gitlabs...etc).
If you don't want to share your project files, please create a demo project, then share it.
Screen captures, and/or native logs(such as Logcat, xcode logs) are appreciate.
Giving much information, you are waiting time is less.
Thank you for your cooperation.
It's not related to your target Android version. It's cause by change from 4.0.x to 4.1.x of AGP (Android Gradle Plugin)
Prior to AGP 4.1.+, assert keyword was not enforced.
Latest Cordova-Android started using AGP 4.1.+, which is causing the AssertionError
I have not tested fix #2872 but if it works please try to merge it so that we can use official release of this plugin and do not have to hack the solution ourselves in code. Without fix we are stuck to cordova-android@9.1.0 and can not use latest cordova-android@10.0.0 which needs Android Gradle Plugin (AGP) version 4.2.2. Thank you!
Activity
sergip76 commentedon Jun 1, 2021
I have this problem.
Which android platform release do I have to install to solve it?
kozuch commentedon Jul 27, 2021
I also have the issue with blank map. Works when AGP 4.0.2 is used, but is broken with AGP 4.1.x and above.
ebhsgit commentedon Jul 27, 2021
@sergip76
It's not related to your target Android version. It's cause by change from 4.0.x to 4.1.x of AGP (Android Gradle Plugin)
Prior to AGP 4.1.+,
assertkeyword was not enforced.Latest
Cordova-Androidstarted using AGP 4.1.+, which is causing theAssertionErrorkozuch commentedon Aug 4, 2021
I have not tested fix #2872 but if it works please try to merge it so that we can use official release of this plugin and do not have to hack the solution ourselves in code. Without fix we are stuck to cordova-android@9.1.0 and can not use latest cordova-android@10.0.0 which needs Android Gradle Plugin (AGP) version 4.2.2. Thank you!
fix: Blank map when starting app using cordova-android branch which h…
fix: Blank map when starting app using cordova-android branch which h…
Squashed commit of the following:
fix: Blank map when starting app using cordova-android branch which h…
v2.7.1.3
v2.7.1.3