Phonegap with polymer material design is not working

312 Views Asked by At

I am making an android phonegap app using polymer material design. Its working fine in chrome but in phone its showing the following error

Imported resource from origin 'file://' has been blocked from loading by Cross-Origin Resource Sharing policy: Received an invalid response. Origin 'null' is therefore not allowed access.

can any one please help me how to solve it ?

2

There are 2 best solutions below

0
Vlad Stirbu On

You should vulcanize the application before deploying on the device. The process will create a single html document that contains all needed custom web components so you won't have to be concerned with additional requests that are blocked due to CORS policy regarding file:// resources.

0
user5379394 On

To make a native Android application using Polymer and Cordova, you must first be aware that it will work best with Android 4.4 and higher. For whatever reason, earlier versions of Android may produce questionable results when rendering the CSS that Polymer requires.