2017-04-03 20 views
1

我使用Ionic2和我刚安装插件推到应用程序,而现在它的createing @串的重复/ google_app_id推插件 - 发现项目字符串/ google_app_id超过一次

即使我删除一个其中,当我运行该项目,离子创建另一个,我不能编译应用程序,由于这个错误。

所以这是我在strings.xml中

<string name="google_app_id">@string/google_app_id</string> 
<string name="google_app_id" translatable="false">XXXXXXXXXX</string> 

我试图消除平台和插件,然后重新添加到proyect得到,但错误不断出现。

谢谢大家!

+0

能否请您分享您的config.xml? – Math10

+0

当然,在这里:https://pastebin.com/eEeQKN5x – Mystearica

+0

在config.xml中没有找到任何push插件。你在使用[this](http://ionicframework.com/docs/native/push/)插件吗? – Math10

回答

2

您可以看到here firebase插件不处理应用程序ID和API密钥。

就你而言,你可以在安装firebase插件后执行此操作。转到plugins文件夹并打开cordova-plugin-firebase\plugin.xml和删除这些行,

<config-file parent="/resources" target="res/values/strings.xml"> 
     <string name="google_app_id">@string/google_app_id</string> 
</config-file> 

然后加入Android平台。现在你可以建立/运行你的android应用程序。

+0

谢谢!奇迹般有效!! – Mystearica

0

这似乎是版本0.1.24

引入了一个问题

代替:

<plugin name="cordova-plugin-firebase" spec="^0.1.24" /> 

为:

<plugin name="cordova-plugin-firebase" spec="0.1.22" /> 

删除和重新添加的平台和工作正常! 无需触碰插件代码

+0

不要犹豫提供链接到更新日志。 – Kmaschta

0

我用这个命令怒吼:

$ cordova clean android 
相关问题