breautek commented on issue #979: URL: https://github.com/apache/cordova-android/issues/979#issuecomment-633070066
`file:///static/media/play.d00c2962.png` is not a valid url. Your application root is something like `file:///android_asset/www/` (going off memory, might be wrong but it's something similar) I suspect you're referencing these files using an absolute path, e.g. `/myfile.png`. This is a common mistake because normally you would consider this relative to your webserver. In cordova, however, by prefixing `/`, you are starting at the root of the filesystem, since the files are hosted on the filesystem. You should use relative urls, which are relative to the html document. So if those files lived in a static folder that is a sibling of the loaded html folder, the path would look like: `./static/myfile.png` Note: while you could specify the full android path, it is better to use relative urls as shown above to remain cross platform. For example, the iOS platform has a completely different file path to the root of your app. Let me know if this helps. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
