Cordova和Ionic:插件没有更新

时间:2021-02-18 23:00:30

I have a question concerning plugins. I am using the ionic framework (http://ionicframework.com/) and Cordova for my hybrid app. I am using a toast (text popup) plugin to provide some feedback. Everything works but I decided that I needed some customization so I edited some of the .java files. It seems that my edit has no impact, it's really strange, the plugin also seems to keep working even when I comment out the execute function.

我有一个关于插件的问题。我正在使用离子框架(http://ionicframework.com/)和Cordova作为我的混合应用程序。我正在使用toast(文本弹出)插件来提供一些反馈。一切正常但我决定我需要一些自定义,所以我编辑了一些.java文件。似乎我的编辑没有任何影响,它真的很奇怪,即使我注释掉执行功能,插件似乎也能继续工作。

I am using the following ionic command to test the app on my smartphone: "ionic run android"

我使用以下离子命令在我的智能手机上测试应用程序:“离子运行android”

Any idea why the plugin is not updating? Thanks in advance!

知道插件没有更新的原因吗?提前致谢!

2 个解决方案

#1


3  

I had issues with plugins as well and decided to remove/add them back in, then update platform and it worked.

我也有插件问题,并决定删除/添加它们,然后更新平台,它工作。

cordova plugin rm org.apache.cordova.<plugin>
cordova plugin add org.apache.cordova.<plugin>
cordova platform update <platform>

#2


2  

When I remove my android platform and install it back it works (it seems the only place where it installs plugins)

当我删除我的Android平台并安装回来它工作(它似乎是它安装插件的唯一的地方)

#1


3  

I had issues with plugins as well and decided to remove/add them back in, then update platform and it worked.

我也有插件问题,并决定删除/添加它们,然后更新平台,它工作。

cordova plugin rm org.apache.cordova.<plugin>
cordova plugin add org.apache.cordova.<plugin>
cordova platform update <platform>

#2


2  

When I remove my android platform and install it back it works (it seems the only place where it installs plugins)

当我删除我的Android平台并安装回来它工作(它似乎是它安装插件的唯一的地方)