App crash after added google play service and fcm api


#1

I am using firebase and google analytics api in my app.

I’am using firebase and google analytics plugins in my app.
Following is my project.Properties
android.library.reference.1=CordovaLib
cordova.system.library.1=com.android.support:support-v4:+
cordova.system.library.2=com.google.firebase:firebase-core:9.0.0
cordova.system.library.3=com.google.firebase:firebase-messaging:9.0.0
cordova.gradle.include.1=cordova-plugin-fcm/app-FCMPlugin.gradle
cordova.gradle.include.2=com-sarriaroman-photoviewer/app-photoviewer.gradle
cordova.system.library.4=com.android.support:support-v4:26.+
cordova.system.library.5=com.android.support:appcompat-v7:26.+
cordova.system.library.6=com.android.support:support-v4:+
cordova.system.library.7=com.google.android.gms:play-services-location:9.0.0
classpath 'com.google.gms:google-services:3.0.0

with this configurations app is crashing / stopped when build success.
I tried another solution when use with classpath com.google.gms:google-services:+ And added some changes in build.gradle file
allprojects
{

maven{
url ‘https://maven.google.com
}

}
then showing error : Could not find method getCompileConfiguration() for arguments [] on object of type com.android.build.gradle.internal.api.ApplicationVariantImpl