Reputation: 89
I'm trying to use the Pusher Beams API for push notifications. It said I need to integrate Firebase with my project first, but I keep getting the following error and none of the resources I found online have helped (which basically all call to play around with the firebase core versions)
ERROR: Failed to resolve: com.firebase:firebase-jobdispatcher:0.8.5
apply plugin: 'com.android.application'
android {
compileSdkVersion 28
defaultConfig {
applicationId "com.parse.starter"
// minSdkVersion rootProject.ext.minSdkVersion
minSdkVersion 21
targetSdkVersion rootProject.ext.targetSdkVersion
versionCode 1
versionName "1.0"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation 'androidx.appcompat:appcompat:1.0.0'
implementation 'com.parse.bolts:bolts-tasks:1.3.0'
implementation 'com.parse:parse-android:1.13.0'
implementation 'androidx.constraintlayout:constraintlayout:1.1.3'
implementation 'com.google.android.material:material:1.0.0'
implementation 'com.google.android.gms:play-services-maps:17.0.0'
implementation 'com.google.firebase:firebase-core:16.0.9'
implementation 'com.google.firebase:firebase-messaging:18.0.0'
implementation 'com.pusher:push-notifications-android:1.4.3'
}
apply plugin: 'com.google.gms.google-services'
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
mavenCentral()
maven {
url 'https://maven.google.com/'
name 'Google'
}
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.4.2'
classpath 'com.google.gms:google-services:4.2.0'
}
}
allprojects {
repositories {
google()
mavenCentral()
maven {
url 'https://maven.google.com/'
name 'Google'
}
}
}
ext {
compileSdkVersion = 22
buildToolsVersion = "23.0.1"
minSdkVersion = 9
targetSdkVersion = 23
}
PROBLEM: the gradle refuses to sync. I've tried to clean/rebuild project/restart android studio, here's the sync error:
this is the error when trying to sync the gradle:
ERROR: Failed to resolve: com.firebase:firebase-jobdispatcher:0.8.5
Show in Project Structure dialog
Affected Modules: ParseStarterProject
Upvotes: 1
Views: 2625
Reputation: 2123
According to Firebase Docs
You no longer need to add the Android library com.google.firebase:firebase-core
Try to remove firebase-core
dependency and see. For more info, refer to this
Upvotes: 0
Reputation: 76809
This might be coming from com.pusher:push-notifications-android:1.4.4
. see the build.gradle.
com.firebase:firebase-jobdispatcher:0.8.5
had been deprecated (maybe removed from the Maven repository) and replaced with androidx
WorkManager.
If you still need it, it's on mavenCentral() repository.
Upvotes: 2
Reputation: 3040
You may need to update your project level build.gradle:
buildscript {
repositories {
google()
jcenter()
}
...
}
allprojects {
repositories {
google()
jcenter()
}
}
Upvotes: 0