I am new to hybrid development. I wrote a small application which launches webview. I have XML, JS files copied in /asset folder.
App works fine on my samsung tablet but I get following errors on emulator
05-30 06:09:07.080: I/chromium(1245): [INFO:CONSOLE(0)] "XMLHttpRequest cannot load file:///android_asset/resource/service_config.xml. Cross origin requests are only supported for HTTP.", source: file:///android_asset/Startup.html (0)
I got to know it happens due to chrome browsers security model and android webview too uses the same component as chrome browser. But all these largely related to chrome browser not addressing the issue on emulator.
Appreciate any help on this issue.
Thanks,
iuq
got the same error. I fixed it by changing some settings of the webview in the activities
onCreate()
method as follows:Hope that might help you :)