admin管理员组文章数量:1315227
Has anyone a running cordova app with polymer?
I am using angular.js with polymer on cordova, in my Chrome (v37) everything is fine, in the Android debug console i get an error and the screen stays white:
07-03 16:53:26.865: D/CordovaLog(11728): file:///android_asset/www/js/index.js: Line 9899 : Error: Assertion failed
07-03 16:53:26.865: D/CordovaLog(11728): at c (file:///android_asset/www/polymer/platform/platform.js:12:21781)
07-03 16:53:26.865: D/CordovaLog(11728): at b (file:///android_asset/www/polymer/platform/platform.js:13:8230)
07-03 16:53:26.865: D/CordovaLog(11728): at b.F.insertBefore (file:///android_asset/www/polymer/platform/platform.js:13:11769)
07-03 16:53:26.865: D/CordovaLog(11728): at b.F.appendChild (file:///android_asset/www/polymer/platform/platform.js:13:11720)
07-03 16:53:26.865: D/CordovaLog(11728): at replaceWith (file:///android_asset/www/js/index.js:6983:16)
07-03 16:53:26.865: D/CordovaLog(11728): at applyDirectivesToNode (file:///android_asset/www/js/index.js:6282:13)
07-03 16:53:26.865: D/CordovaLog(11728): at pileNodes (file:///android_asset/www/js/index.js:5958:15)
07-03 16:53:26.865: D/CordovaLog(11728): at pileNodes (file:///android_asset/www/js/index.js:5970:15)
07-03 16:53:26.865: D/CordovaLog(11728): at pileNodes (file:///android_asset/www/js/index.js:5970:15)
07-03 16:53:26.865: D/CordovaLog(11728): at pileNodes (file:///android_asset/www/js/index.js:5970:15)
Polymer is on version 0.3.3 and cordova is 3.5.0-0.2.4, Android is 4.4.4
The app doesnt start and i removed all the html for testing, but the error stays the same
Has anyone a running cordova app with polymer?
I am using angular.js with polymer on cordova, in my Chrome (v37) everything is fine, in the Android debug console i get an error and the screen stays white:
07-03 16:53:26.865: D/CordovaLog(11728): file:///android_asset/www/js/index.js: Line 9899 : Error: Assertion failed
07-03 16:53:26.865: D/CordovaLog(11728): at c (file:///android_asset/www/polymer/platform/platform.js:12:21781)
07-03 16:53:26.865: D/CordovaLog(11728): at b (file:///android_asset/www/polymer/platform/platform.js:13:8230)
07-03 16:53:26.865: D/CordovaLog(11728): at b.F.insertBefore (file:///android_asset/www/polymer/platform/platform.js:13:11769)
07-03 16:53:26.865: D/CordovaLog(11728): at b.F.appendChild (file:///android_asset/www/polymer/platform/platform.js:13:11720)
07-03 16:53:26.865: D/CordovaLog(11728): at replaceWith (file:///android_asset/www/js/index.js:6983:16)
07-03 16:53:26.865: D/CordovaLog(11728): at applyDirectivesToNode (file:///android_asset/www/js/index.js:6282:13)
07-03 16:53:26.865: D/CordovaLog(11728): at pileNodes (file:///android_asset/www/js/index.js:5958:15)
07-03 16:53:26.865: D/CordovaLog(11728): at pileNodes (file:///android_asset/www/js/index.js:5970:15)
07-03 16:53:26.865: D/CordovaLog(11728): at pileNodes (file:///android_asset/www/js/index.js:5970:15)
07-03 16:53:26.865: D/CordovaLog(11728): at pileNodes (file:///android_asset/www/js/index.js:5970:15)
Polymer is on version 0.3.3 and cordova is 3.5.0-0.2.4, Android is 4.4.4
The app doesnt start and i removed all the html for testing, but the error stays the same
Share Improve this question edited Jul 11, 2014 at 7:14 pfried asked Jul 3, 2014 at 15:47 pfriedpfried 5,0892 gold badges41 silver badges78 bronze badges 1- I'm trying it out on Chrome (36) beta but not Cordova. I've had problems with binding. Specifically ngNodel doesn't work for things like paper-checkbox. Also, custom properties don't seem to bind correctly. Look at angular-bind-polymer to see if it works for you github./eee-c/angular-bind-polymer. – ipaul Commented Jul 3, 2014 at 16:06
5 Answers
Reset to default 5I got it working with Android 4.4. I've heard rumors you can use Crosswalk to get it working with earlier versions of Android.
I made a tutorial of my Polymer Cordova project here:
https://www.thepolyglotdeveloper./2014/07/use-polymer-apache-cordova/
Nics tutorial is really good. Thanks Nic.
Moreover I remend to check Chrome Dev Editor, it has already built in everything to play and run.
MobileChromeApps https://github./MobileChromeApps/mobile-chrome-apps
ChromeDevEditor https://github./dart-lang/chromedeveditor
Hope it helps.
I am using Polymer with Cordova on iPhone 6, and it works really well.
It works fine for me on 4.4.4 but I needed to support earlier versions so I used MobileChromeApps which uses Cordova and crosswalk to deploy your app with chrome instead of using the default browser that isnt supported by polymer.
This worked fine for me but on iOS it's not using chrome and is using the default webView which is safari which doesn't seem to work with MobileChromeApps but does work with plain old Cordova. Uuugh.
Anyone got cross walk working for iOS with MobileChromeApps?
I've had also a lot of problems making Polymer 1.0 work. For me the solution was to solve CORS (Cross scripting), App security related problems. The trick was to add the following in the config.xml.
<gap:plugin name="cordova-plugin-whitelist" source="npm" version="1.2.1" />
With the options
<allow-navigation href="http://*/*" />
<allow-navigation href="https://*/*" />
<allow-navigation href="data:*" />
<allow-intent href="http://*/*" />
<allow-intent href="https://*/*" />
<access origin="*" />
It's not secure to use them in this way (you allow everything, to everybody). But it gave me access to Polyfill and other Stuff, using external CDN servers. Which were at first blocking me, showing a white screen.
本文标签: javascriptPolymer on CordovaStack Overflow
版权声明:本文标题:javascript - Polymer on Cordova - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1741982300a2408470.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论