2017-01-13 7 views
0

ionic package build androidコマンドでIonic2アプリをビルドしようとしています。ビルドには、次のエラーで失敗します。Ionicパッケージビルドでプッシュプラグインを作成できません

FAILURE: Build failed with an exception. 

* What went wrong: 
Execution failed for task ':processDebugGoogleServices'. 
> File google-services.json is missing. The Google Services Plugin cannot function without it. 
    Searched Location: 
    /home/package/workspace/apps-**********/cordova/platforms/android/src/debug/google-services.json 
    /home/package/workspace/apps-**********/cordova/platforms/android/google-services.json 

プロジェクトは現在、コルドバ・プラグイン・FCMプラグインを使用し、Googleの-services.jsonファイルが正しい場所にあります。 codeova-google-fcm-configプラグインで問題なく解決しようとしました。 以前、私はphonegap-plugin-pushプラグインを試しましたが、それは単にビルドに含まれていませんでした。 config.xmlには、実際に使用されているプラ​​グインが含まれています。

ローカルマシンにビルドすると両方のビルドが正しく行われます。ビルドサービスはどのように使用できますか? google-services.jsonファイルはどこにコピーする必要がありますか?

答えて

0

From phonegap-plugin-push 2.x documentation -> INSTALLATION

As of version 2.0.0 the SENDER_ID parameter has been removed at install time. Instead you put your google-services.json (Android) and/or GoogleService-Info.plist in the root folder of your project and then add the following lines into your config.xml.

In the platform tag for Android add the resource-file tag:

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

ビルドコマンドはplatforms/android/google-services.json

に直接ファイルをコピーする動作しない場合
関連する問題