Я работаю в своем приложении Ionic 4 и использую Health Native Plugin
и FCM Notification Native Plugin
, но проблема в том, что при установке обоих они конфликтуют.
Ошибка, которая приходитво время работы ionic cordova run android
:
Исправьте конфликт версий, либо обновив версию плагина google-services (информация о последней версии доступна по адресу https://bintray.com/android/android-tools/com.google.gms.google-services/) илиобновить версию com.google.android.gms до 10. +.
Это мои платформы> android> cordova-plugin-fcm-with-dependecy-updated> rflchallenges-FCMPlugin.gradle :
buildscript {
repositories {
mavenCentral()
jcenter()
mavenLocal()
}
dependencies {
classpath 'com.android.tools.build:gradle:2.3.+'
classpath 'com.google.gms:google-services:3.1.+'
}
}
repositories {
mavenCentral()
jcenter()
}
dependencies {
compile 'com.google.firebase:firebase-core:10.+'
}
// apply plugin: 'com.google.gms.google-services'
// class must be used instead of id(string) to be able to apply plugin from non-root gradle file
apply plugin: com.google.gms.googleservices.GoogleServicesPlugin
Это мои платформы> android> build.gradle :
buildscript {
repositories {
maven {
url "https://maven.google.com"
}
jcenter()
}
dependencies {
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
classpath 'com.android.tools.build:gradle:3.0.1'
}
}
allprojects {
repositories {
maven {
url "https://maven.google.com"
}
jcenter()
}
//This replaces project.properties w.r.t. build settings
project.ext {
defaultBuildToolsVersion="27.0.1" //String
defaultMinSdkVersion=19 //Integer - Minimum requirement is Android 4.4
defaultTargetSdkVersion=27 //Integer - We ALWAYS target the latest by default
defaultCompileSdkVersion=27 //Integer - We ALWAYS compile with the latest by default
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Это мои платформы> android> app> build.gradle :
apply plugin: 'com.android.application'
buildscript {
repositories {
mavenCentral()
maven {
url "https://maven.google.com"
}
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.0.1'
}
}
// Allow plugins to declare Maven dependencies via build-extras.gradle.
allprojects {
repositories {
mavenCentral();
jcenter()
}
}
task wrapper(type: Wrapper) {
gradleVersion = '4.1.0'
}
dependencies {
implementation fileTree(dir: 'libs', include: '*.jar')
// SUB-PROJECT DEPENDENCIES START
implementation(project(path: ":CordovaLib"))
compile "com.android.support:support-v4:24.1.1+"
compile "com.android.support:support-annotations:27.+"
compile "com.google.firebase:firebase-core:10.+"
compile "com.google.firebase:firebase-messaging:10.+"
compile "com.google.android.gms:play-services-fitness:16.0.1"
// SUB-PROJECT DEPENDENCIES END
}
gradle.taskGraph.whenReady { taskGraph ->
taskGraph.getAllTasks().each() { task ->
if(['validateReleaseSigning', 'validateSigningRelease', 'validateSigningArmv7Release', 'validateSigningX76Release'].contains(task.name)) {
promptForReleaseKeyPassword()
}
}
}
// This can be defined within build-extras.gradle as:
// ext.postBuildExtras = { ... code here ... }
if (hasProperty('postBuildExtras')) {
postBuildExtras()
}
Я застрял в этом с 2 дня.
Я пытался это: https://forum.ionicframework.com/t/google-services-version-conflict-maps-fcm/93695 но теперь ошибка:
Произошла проблема при настройке корневого проекта 'android'. Конфигурация с именем 'compile' не найдена.
Но проблемаЯ думаю, что когда вы решите эту проблему, и после этого возникнет конфликтная проблема.
Любая помощь будет высоко оценена.