首页 文章

使用PhoneGap Build,它说'google-services.json is missing'但它不是

提问于
浏览
0

我正在使用Phonegap Build为 AndroidiOSWindows Phone构建应用程序 . 要发送通知,我正在使用phonegap-plugin-push但无法管理构建apk .


在我的config.xml中,我把它添加到google-services.json中

<platform name="android">
    <resource-file src="google-services.json" target="google-services.json" />
</platform>

即使google-services.json is in my root folder beside config.xml ,我也从PhoneGap Build中收到此错误

任务执行失败':processDebugGoogleServices' . 文件google-services.json丢失了 . 没有它,Google Services插件无法运行 . 搜索位置:/project/src/debug/google-services.json /project/google-services.json

我仍然不明白为什么它不能正常工作,因为它正是要求做的 . 在此先感谢您的帮助 .


Additional infos :

我在push-plugin(2.0.0)旁边使用了phonegap cli-7.1.0和其他cordova插件,这里是列表:

<plugin name="cordova-plugin-device" spec="1.1.6" source="npm" />
<plugin name="cordova-plugin-splashscreen" spec="4.0.3" source="npm" />
<plugin name="cordova-plugin-network-information" spec="1.3.3" source="npm" />
<plugin name="cordova-plugin-inappbrowser" spec="1.7.1" source="npm" />
<plugin name="cordova-plugin-statusbar" spec="2.2.3" source="npm" />
<plugin name="cordova-plugin-whitelist" spec="1.3.2" source="npm" />
<plugin name="cordova-plugin-screen-orientation" spec="2.0.1" source="npm" />

EDIT

它似乎在's an issue with the PhoneGap Build (PGB) version I'米使用 . 应该使用新的PGB构建器构建push-plugin的2.0.0版本 . https://blog.phonegap.com/phonegap-7-0-1-now-on-build-and-it-includes-some-important-changes-89087fe465f5

1 回答

  • 0

    正如我在问题的 EDIT 部分所述,它与PGB的构建器版本有关 .

    添加到我的config.xml <preference name='pgb-builder-version' value='2' /> 后,找到了google-services.json(我仍然收到错误,但它与此文件无关)

相关问题