Android app is crashing just after onesignal push notification is sent.
I am getting this error. Tried looking at other stackoverflow answers but it didn't help.
Please check the code (build.gradle) & error below.
Dont understant why is it not working :P
Please check the code (build.gradle) & error below.
FATAL EXCEPTION: Firebase-FirebaseMessagingService
Process: com.mario.childhood.game.videogame, PID: 30163
java.lang.AbstractMethodError: abstract method "void com.google.firebase.iid.zzb.zzd(android.content.Intent)"
at com.google.firebase.iid.zzc.run(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1133)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:607)
at com.google.android.gms.common.util.concurrent.zza.run(Unknown Source)
at java.lang.Thread.run(Thread.java:760)
build.gradle
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.myapp"
minSdkVersion 15
targetSdkVersion 27
versionCode 3
versionName "1.2"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
manifestPlaceholders = [onesignal_app_id: 'XXXX-310c-4776-ae83-XXXX',
// Project number pulled from dashboard, local value is ignored.
onesignal_google_project_number: '22978XXXX'
]
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
implementation 'com.anjlab.android.iab.v3:library:1.0.44'
testImplementation 'junit:junit:4.12'
implementation 'com.github.delight-im:Android-AdvancedWebView:v3.0.0'
implementation 'com.google.firebase:firebase-ads:15.0.1'
implementation 'com.onesignal:OneSignal:[3.9.1, 3.99.99]'
}
build.gradle
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.0-alpha09'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
maven { url "https://jitpack.io" }
maven { url "https://maven.google.com" }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
You forgot to apply the OneSignal gradle plugin. According to the documentation, you should add
buildscript {
repositories {
maven { url 'https://plugins.gradle.org/m2/'}
}
dependencies {
classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin: [0.10.1, 0.99.99]'
}
}
apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'
to the very top of your app/build.gradle
When applied to your file, it should look like this:
buildscript {
repositories {
maven { url 'https://plugins.gradle.org/m2/'}
}
dependencies {
classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin: [0.10.1, 0.99.99]'
}
}
apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.myapp"
minSdkVersion 15
targetSdkVersion 27
versionCode 3
versionName "1.2"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
manifestPlaceholders = [onesignal_app_id: 'XXXX-310c-4776-ae83-XXXX',
// Project number pulled from dashboard, local value is ignored.
onesignal_google_project_number: '22978XXXX'
]
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:cardview-v7:27.1.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.0'
implementation 'com.anjlab.android.iab.v3:library:1.0.44'
testImplementation 'junit:junit:4.12'
implementation 'com.github.delight-im:Android-AdvancedWebView:v3.0.0'
implementation 'com.google.firebase:firebase-ads:15.0.1'
implementation 'com.onesignal:OneSignal:[3.9.1, 3.99.99]'
}
One Signal cannot work on its on, You haven't read their documentation thoroughly. It need FCM to work. They have a plugin which will automatically add all the dependencies. Add this code to your app gradle
buildscript {
repositories {
maven { url 'https://plugins.gradle.org/m2/'}
}
dependencies {
classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:[0.10.1, 0.99.99]'
}
}
apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'
repositories {
maven { url 'https://maven.google.com' }
}
Related
As you can see here are the errors I'm getting when I'm trying to sync my project I'm getting this issue again and again. Gradle is in Online mode. I also tried offline mode but I found the same issue.
I also tried so many methods but still, I can't able to solve this problem.
Gradle Sync Error
ERROR: Unable to resolve dependency for ':app#debugUnitTest/compileClasspath': Could not resolve com.google.android.gms:play-services-base:[10.2.1, 16.1.99]
Build.gradle (project)
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.6.3'
classpath 'com.google.gms:google-services:4.3.3'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
mavenLocal()
jcenter()
maven { url "https://maven.google.com" }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Build.gradle (:app)
buildscript {
repositories {
maven { url 'https://plugins.gradle.org/m2/' }
}
dependencies {
classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:[0.12.6, 0.99.99]'
}
}
apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'
repositories {
maven { url 'https://maven.google.com' }
}
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
useLibrary 'org.apache.http.legacy'
defaultConfig {
vectorDrawables {
useSupportLibrary = true
}
vectorDrawables.useSupportLibrary = true
applicationId "com.game.pubg.best.tournaments"
// TODO: Please update the OneSignal ID below to yours!
manifestPlaceholders = [onesignal_app_id: '6554b669-a188-4110-8836-b181ff64894b',
// Project number pulled from dashboard, local value is ignored.
onesignal_google_project_number: 'REMOTE']
minSdkVersion 19
targetSdkVersion 28
versionCode 1
versionName "1"
multiDexEnabled true
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
javaCompileOptions {
annotationProcessorOptions {
includeCompileClasspath false
}
}
}
repositories {
mavenCentral()
maven { url 'http://repo1.maven.org/maven2' }
maven { url "http://jcenter.bintray.com" }
maven { url "https://www.jitpack.io" }
maven { url "https://maven.google.com" }
maven { url 'https://dl.bintray.com/drummer-aidan/maven' }
maven { url "https://s3-ap-southeast-1.amazonaws.com/godel-release/godel/" }
jcenter()
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
// debug {
// minifyEnabled true
// proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
// }
}
}
apply plugin: 'com.google.gms.google-services'
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:support-vector-drawable:28.0.0'
// implementation 'ai.devsupport.instamojo:instamojolib:0.1.6'
androidTestImplementation('com.android.support.test.espresso:espresso-core:3.0.2',
{
exclude group: 'com.android.support', module: 'support-annotations'
}
)
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.android.support:design:28.0.0'
// implementation 'com.google.android.gms:play-services-ads:17.0.0'
implementation 'de.hdodenhof:circleimageview:3.1.0'
implementation 'com.facebook.shimmer:shimmer:0.5.0'
implementation 'me.zhanghai.android.materialprogressbar:library:1.6.1'
implementation 'com.github.bumptech.glide:glide:4.11.0'
implementation 'com.onesignal:OneSignal:[3.13.0, 3.99.99]'
implementation('com.paytm:pgplussdk:1.3.3')
{
transitive = true
}
implementation 'org.jsoup:jsoup:1.13.1'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.13'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
implementation 'com.google.firebase:firebase-core:16.0.1'
implementation 'com.google.firebase:firebase-database:16.0.1'
implementation 'com.google.android.gms:play-services-auth:18.0.0'
}
Add apply plugin: 'com.google.gms.google-services' to build.gradle (:app)
Try dependencies of answer of this question: Android Studio can't find Kotlin dependency
I have a problem in the Gradle files. As I have updated the Android Studio I had to update the dependencies as well, but I'm getting unresolved dependencies.
Project gradle:
buildscript {
repositories {
mavenCentral()
maven { url 'https://maven.fabric.io/public' }
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.1'
classpath 'io.fabric.tools:gradle:1.29.0'
classpath 'com.novoda:bintray-release:0.4.1'
classpath 'com.google.gms:google-services:4.1.0'
}
}
allprojects {
repositories {
maven { url 'https://maven.fabric.io/public' }
jcenter()
}
}
app gradle:
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'io.fabric'
android {
compileSdkVersion 28
buildToolsVersion '28.0.3'
useLibrary 'org.apache.http.legacy'
defaultConfig {
applicationId "com.packagename"
minSdkVersion 21
targetSdkVersion 28
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled true
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-project.txt'
}
}
lintOptions {
disable "ResourceType"
}
}
ext {
googlePlayServicesVersion = "4.2.0"
}
dependencies {
implementation files('libs/icu4j-4_4_2_2.jar')
implementation files('libs/jsoup-1.6.3.jar')
implementation files('libs/ksoap2-android-assembly-2.6.0-jar-with-dependencies.jar')
implementation files('libs/zip4j_1.2.6.jar')
implementation('com.crashlytics.sdk.android:crashlytics:2.9.9#aar') {
transitive = true;
}
implementation 'com.facebook.android:facebook-android-sdk:4.38.1'
// Google
implementation 'com.google.android.gms:play-services-auth:16.0.1'
implementation'com.google.firebase:firebase-auth:16.1.0'
// Firebase
implementation 'com.google.firebase:firebase-messaging:17.3.4'
implementation 'com.google.firebase:firebase-core:16.0.3'
implementation 'com.google.android.gms:play-services-ads:17.2.1'
implementation project(':pdflibrary')
implementation 'com.android.support:support-compat:27.0.2'
implementation 'com.android.support:cardview-v7:27.0.2'
implementation 'com.android.support:customtabs:27.0.2'
implementation files('libs/junit-4.3.jar')
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation 'com.google.android.gms:play-services-flags:16.0.1'
implementation 'com.google.android.gms:play-services-basement:16.0.1'
implementation fileTree(dir: 'libs', include: ['*.jar'])
}
pdfLibrary gradle:
apply plugin: 'com.android.library'
apply plugin: 'com.novoda.bintray-release'
android {
compileSdkVersion 28
buildToolsVersion '28.0.3'
defaultConfig {
minSdkVersion 24
targetSdkVersion 28
versionCode 1
versionName '1'
}
sourceSets {
main {
jniLibs.srcDirs = ['libs']
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
}
publish {
userOrg = 'thefinestartist'
groupId = 'com.thefinestartist'
artifactId = 'finestwebview'
publishVersion = '1'
desc = 'Beautiful and customizable Android Activity that shows web pages within an app.'
website = 'https://github.com/TheFinestArtist/FinestWebView-Android'
}
This is the errors I'm getting knowing that min-sdk is set to 24 and I only in the gradle and I have removed it from both manifests (app & pdfLibrary):
I have tried suggestion from other SO questions, but nothing worked.
edit minSdkVersion to 21 instead of 24 in pdfLibrary gradle
an sync project
In the allprojects block you have to add the google() maven repo.
allprojects {
repositories {
google()
maven { url 'https://maven.fabric.io/public' }
jcenter()
}
}
why my material calendar view failed to resolve, here is my
Module: app
apply plugin: 'com.android.application'
android {
compileSdkVersion 26
defaultConfig {
applicationId "com.project.cms"
minSdkVersion 22
targetSdkVersion 26
versionCode 1
versionName "1.0"
testInstrumentationRunner
"android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android- optimize.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:26.0.0-beta1'
implementation 'com.android.support:design:26.0.0-beta1'
implementation 'com.android.support:support-v4:26.0.0-beta1'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso- core:3.0.2'
implementation 'com.github.ybq:Android-SpinKit:1.2.0'
implementation 'com.android.support:cardview-v7:26.0.0-beta1'
implementation 'com.android.support:recyclerview-v7:26.0.0-beta1'
implementation 'com.github.prolificinteractive:material-calendarview:2.0'
}
here is my BUILD FILE
buildscript {
repositories {
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.2'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
maven { url 'https://jitpack.io' }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
when I sync the gradle the error showed is
Failed to resolve:
com.github.prolificinteractive:material-calendarview:2.0
open.dependency.in.project.structure affected module app
Please help me
There is an issue in your dependency version
implementation 'com.github.prolificinteractive:material-calendarview:2.0'
Replace with
implementation 'com.github.prolificinteractive:material-calendarview:2.0.0'
Place this code:
dependencyResolutionManagement {
repositoriesMode.set(RepositoriesMode.FAIL_ON_PROJECT_REPOS)
repositories {
google()
mavenCentral()
maven { url 'https://jitpack.io' }
}
}
in the settings.gradle
Getting error while using Add Firebase Authentication to your App in the Firebase authentication (Assistant).
The error shows in the Sync tab as:
Could not GET 'https://dl.google.com/dl/android/maven2/com/google/gms/google-services/4.0.1/google-services-4.0.1.pom'. Received status code 405 from server: Method Not Allowed
Enable Gradle 'offline mode' and sync project
My Android Studio Details are:
Android Studio version 3.2.1
Gradle version: 4.6
build.gradle (Project)
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
maven { url 'https://dl.bintray.com/android/android-tools' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.google.gms:google-services:4.0.1'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
build.gradle (App)
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.nsc.suyog.myotp1"
minSdkVersion 21
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:27.1.1'
testImplementation 'junit:junit:4.12'
implementation 'com.google.firebase:firebase-auth:16.0.1:15.0.0'
}
Try to change the following code (project):
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
maven { url "http://jcenter.bintray.com"}
maven { url 'https://dl.bintray.com/android/android-tools' }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.3.0'
classpath 'com.google.gms:google-services:4.2.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
maven { url "http://jcenter.bintray.com"}
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
And (app):
apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.nsc.suyog.myotp1"
minSdkVersion 21
targetSdkVersion 27
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
android { lintOptions { abortOnError false }
aaptOptions {
cruncherEnabled = false
}
}
dependencies {
implementation fileTree(dir: 'libs', include: ['*.jar'])
implementation 'com.android.support:appcompat-v7:27.1.1'
testImplementation 'junit:junit:4.12'
implementation 'com.google.firebase:firebase-auth:16.1.0'
}
Also in gradle-wrapper.properties add this line or change if already exist with other value:
distributionUrl=https\://services.gradle.org/distributions/gradle-4.10.1-all.zip
Just remove :15.0.0 from the firebase implementation!
The implementation should be like:
implementation 'com.google.firebase:firebase-auth:16.1.0'
Else every thing seems fine!
First : Let me explain the situation , i have an sdk works with google Api and implementing a lot of dependencies. then i implement the lib into my new app which is also implements dependencies. everything goes fine until i try to run the app.
When i run (on device) my project I get the following error message:
Error: Program type already present: com.google.android.gms.location.places.zza
With the following stacktrace in the Gradle Log (not all of it)
Program type already present: com.google.android.gms.location.places.zza
Learn how to resolve the issue at https://developer.android.com/studio/buil/dependencies#duplicate_classes. at com.android.builder.profile.Recorder$Block.handleException(Recorder.java:55)
at com.android.builder.profile.ThreadRecorder.record(ThreadRecorder.java:104)
at com.android.build.gradle.internal.pipeline.TransformTask.transform(TransformTask.java:230)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.gradle.internal.reflect.JavaMethod.invoke(JavaMethod.java:73)
at org.gradle.api.internal.project.taskfactory.IncrementalTaskAction.doExecute(IncrementalTaskAction.java:50)
Here is build.gradle Project (lib)
buildscript {
repositories {
google()
jcenter()
}
dependencies {
//**------------Added Recently----------------**//
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.google.gms:google-services:4.1.0'
classpath 'com.jfrog.bintray.gradle:gradle-bintray-plugin:1.7.3'
classpath 'com.github.dcendents:android-maven-gradle-plugin:1.5'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files}
}
plugins {
id "com.jfrog.bintray" version "1.7.3"
}
allprojects {
repositories {
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
And this is build.gradle Module:app(lib)
apply plugin: 'com.android.library'
archivesBaseName = "inngage-lib"
ext {
PUBLISH_GROUP_ID = 'br.com.inngage.sdk'
PUBLISH_ARTIFACT_ID = 'inngage-lib'
PUBLISH_VERSION = '2.2.0'
}
android {
lintOptions {
abortOnError false
}
signingConfigs {
w
release {
keyAlias 'inngage-lib'
keyPassword '************************************'
storeFile file('/Users/Downloads/inngage-lib.keystore')
storePassword '***********************************'
}
}
compileSdkVersion 28
useLibrary 'org.apache.http.legacy'
defaultConfig {
minSdkVersion 14
targetSdkVersion 28
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
signingConfig signingConfigs.release
}
debug {
minifyEnabled false
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
//noinspection UseOfBundledGooglePlayServices
//implementation 'com.google.android.gms:play-services:12.0.1'
// implementation "com.google.android.gms:play-services-base:16.0.1"
implementation 'com.google.firebase:firebase-core:16.0.4'
implementation 'com.google.firebase:firebase-messaging:17.3.4'
implementation 'com.google.android.gms:play-services-gcm:16.0.0'
implementation 'com.google.android.gms:play-services-maps:16.0.0'
implementation 'com.google.android.gms:play-services-location:16.0.0'
implementation 'com.google.android.gms:play-services-iid:16.0.0'
testImplementation 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'
apply from: 'https://raw.githubusercontent.com/blundell/release-android-library/master/android-release-aar.gradle'
apply plugin: 'com.jfrog.bintray'
Here is build.gradle Project(** my App**)
buildscript {
repositories {
maven { url "https://dl.bintray.com/inngage/repo" }
google()
jcenter()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.2.1'
classpath 'com.google.gms:google-services:4.1.0'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
maven { url "https://dl.bintray.com/inngage/repo" }
google()
jcenter()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
And this is build.gradle Module:app(** my App**)
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.admin.sdk_test"
minSdkVersion 23
targetSdkVersion 28
versionCode 1
versionName "1.0"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation fileTree(include: ['*.jar'], dir: 'libs')
//noinspection GradleCompatible
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
/* added */
implementation 'com.google.firebase:firebase-core:16.0.4'
implementation 'com.google.firebase:firebase-auth:16.0.5'
implementation 'com.google.firebase:firebase-messaging:17.3.4'
/* Inngage SDK*/
implementation 'br.com.inngage.sdk:inngage-lib:2.2.0'
/*---------------*/
testImplementation 'junit:junit:4.12'
androidTestImplementation 'com.android.support.test:runner:1.0.2'
androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
}
apply plugin: 'com.google.gms.google-services'
I Added this dependency and it worked fine !
implementation 'com.google.android.gms:play-services-places:16.0.0'
already present is never being caused by a missing dependency ...
implementation ("br.com.inngage.sdk:inngage-lib:2.2.0") {
exclude group: "com.google.android.gms", module: "play-services"
}
just see MavenCentral, it adds a few duplicate & outdated dependencies.
the problem is that you have a duplicated dependency with different version if you can find the implementation that needs com.google.android.gms.location you can put under it exclude com.google.android.gms or simply in build.gradle module:project
ext {
googlePlayServicesVersion = "16.0.0"
}