I am trying to add FCM to my application to send push notifications. But I had a problem.
I do everything according to google tutorial
add the build.gradle project to the project :
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.0-alpha05'
classpath 'com.google.gms:google-services:3.1.1'
}
}
add build.gradle to the application
dependencies {
...
compile 'com.google.firebase:firebase-core:11.8.0'
compile 'com.google.firebase:firebase-messaging:11.8.0'
}
apply plugin: 'com.google.gms.google-services'
but after adding
compile 'com.google.firebase:firebase-core:11.8.0'
compile 'com.google.firebase:firebase-messaging:11.8.0'
and synchronize the project, I got a build error -
No default value found.
screenshot
If you remove the firebase dependencies from gradle, everything is fine and the application works correctly. Of course I updated everything (SDK, gradle version, etc.)
I am developing an instant application, so the project is modular (application, instantapp, base, feature, etc.).
- , ?