Конфликт версий Google Services после добавления плагина FCM: ionic 3 - PullRequest
0 голосов
/ 19 сентября 2018

Я пытаюсь использовать плагин FCM, но все мои идеи провалились:

Случай 1: я добавил cordova-plugin-fcm-with-dependecy-updated с плагином cordova-google-plus, который вызываетСбой сборки Cordova:

screenshot

Случай 2: Я прокомментировал следующие строки в файле fcmplugin.gradle

classpath 'com.android.tools.build:gradle:3.0.0'
classpath 'com.google.gms:google-services:4.1.0'   
apply plugin: 'com.google.gms.googleservices.GoogleServicesPlugin'

Затем я добавилследующие строки в проекте build.gradle

classpath 'com.android.tools.build:gradle:3.0.0'
classpath 'com.google.gms:google-services:4.1.0'
apply plugin: 'com.google.gms.google-services' at the bottom of build.gradle

Cordova Build Успешно, но приложение не работает на устройстве / эмуляторе («Приложение остановлено»).

Плагины, используемые в моем приложении:

enter image description here

1 Ответ

0 голосов
/ 17 октября 2018

Пожалуйста, удалите Удалить платформу Android в FCMPlugin.gradle (папка плагина), отредактируйте так:

classpath 'com.google.gms:google-services:4.1.0'
compile 'com.google.firebase:firebase-core:11.0.4'

Затем в файле plugin.xml

<framework src="com.google.firebase:firebase-core:11.0.4" />
<framework src="com.google.firebase:firebase-messaging:11.0.4" />
...