简体   繁体   English

离子科尔多瓦运行android --prod事件无法正常工作

[英]ionic cordova run android --prod events not working properly

I have installed ion2-calendar in my ionic application using npm install ion2-calendar moment --save and i have made some changes on its files located in node_modules/ion2-calendar/dist/components/month.component.js , i have added (panEnd) and (panStart) in its dates.it is working good using ionic serve and ionic cordova run android .but the events are not working when we make build usinng --prod option like 我已经使用npm install ion2-calendar moment --save在我的离子应用npm install ion2-calendar moment --save并且我对位于node_modules/ion2-calendar/dist/components/month.component.js文件进行了一些更改(panEnd)(panStart)在它的日期。使用ionic serveionic cordova run android很好,但是当我们进行build usinng --prod选项时,事件不起作用

ionic cordova run android --prod

the build was successfull and we can run the app on mobile,but the added event does not works.is there anything we need to do to add this changees in production build? 构建成功,我们可以在移动设备上运行该应用,但是添加的事件不起作用。是否需要做任何操作才能在生产构建中添加此更改?

I had the same situation but I solved this doing this step and rebuilding the project for production. 我遇到了同样的情况,但是我执行了此步骤并重建了生产项目,从而解决了这一问题。

try production build commands after removing local page module file (ie login.module.ts) of each of your page! 在删除每个页面的本地页面模块文件(即login.module.ts)之后,尝试生产构建命令!

I mean do this 我是说 在此处输入图片说明

To

在此处输入图片说明

NOTE!! 注意!! if that does not work for your do post your logs by testing your device logs using 如果这对您不起作用,请通过使用以下命令测试设备日志来发布日志

CHROME DEV tools. CHROME DEV工具。 you can inspect device logs there using 您可以使用以下命令检查设备日志

chrome://inspect/#devices

make sure you are using ADB drivers for your android on your machine! 确保您在机器上为Android使用ADB驱动程序!

you won't require this for IOS though you can directly check your log commands in XCODE Console! 尽管您可以直接在XCODE Con​​sole中检查日志命令,但IOS不需要此功能!

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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