You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@cordova.apache.org by GitBox <gi...@apache.org> on 2021/09/03 21:02:11 UTC
[GitHub] [cordova-android] breautek commented on issue #1316: Failed to load assets image with Version > 10
breautek commented on issue #1316:
URL: https://github.com/apache/cordova-android/issues/1316#issuecomment-912808502
ooph...
I think this might be because native code is external from the webview, and `localhost` server doesn't actually exist to anything outside the webview (I think...). Not 100% sure, but a theory.
There are two workarounds you can try...
### Remapping https:// paths to local file:// paths
Anything you tell google maps to load can *probably* be remapped from `https://localhost/assets/imgs/map/mapPinGreen/mapPinGreen.png` to `file:///android_assets/imgs/map/mapPinGreen/mapPinGreen.png`
Basically replace `https://localhost/assets` with `file:///android_assets/`
Not really sure if this will work, but it's worth a try.
### Opting out of WebAssetLoader
You can tell cordova to opt out of using the `WebAssetLoader` system by enabling the `AndroidInsecureFileModeEnabled` preference, which will make it use file based paths just like cordova-android@9. I'm pretty sure this will work.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@cordova.apache.org
For additional commands, e-mail: issues-help@cordova.apache.org