简体   繁体   中英

Deploy working polymer app to android using cordova

Yes,We have resources for this on net and I searched for that ,But it didn't solve my problem so asking this question here. I have a working polymer web app and I am able to access this using http://localhost:8080//index.html,My app looks like this

在此输入图像描述 I want to deploy this app in android phone,So I used apache cordova Below are the steps I followed

  1. Installed cordova using

npm install -g cordova.

  1. create cordova project

    cordova create alertsDir com.alerts.net "Alerts" --template=C:/Users/212606402/Learning/Alert client/alert-push-notification-client

  2. cd to alertsDir and add platform

cordova platform add android

  1. build platform

cordova build android

  1. run project

cordova run android

I am not getting any error in above steps

I run this in both android emulator and nexus 5 devise but it showing the same default cordova screen,My app is not shown there,Below is the emulator screen I am seeing

在此输入图像描述 I followed some tutorials and just wondering how it works for them.

tuetorial 1 Can anyone please explain me what I am missing or doing wrong.Thanks in advance.

as far as i know, Cordova only deploy 2 folder platforms folder and www folder but not all in platforms folder will get deployed to your device, usually the cli will merge platform_www and www folder. so if you want to make a cordova app you need to put all your sourcecode or sourcecode that already bundeled using either polymer-build with gulp or polymer-cli inside www directory.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM