Reputation: 1144
My project ran fine yesterday. I open it today and get this error:
Program type already present: com.google.android.gms.internal.auth.zzao
I tried updating the firebase libraries and then I get these errors and clicking install doesn't work:
Failed to resolve: com.google.firebase:firebase-core:17.3.0
Open File
Show in Project Structure dialog
Failed to resolve: com.google.android.gms:play-services-maps:17.3.0
Install Repository and sync project
Open File
Show in Project Structure dialog
Failed to resolve: com.google.android.gms:play-services-location:17.3.0
Install Repository and sync project
Open File
Show in Project Structure dialog
Failed to resolve: com.google.android.gms:play-services-places:17.3.0
Install Repository and sync project
Open File
Show in Project Structure dialog
Failed to resolve: com.google.android.gms:play-services-auth:17.3.0
Install Repository and sync project
Open File
Show in Project Structure dialog
Failed to resolve: com.google.android.gms:play-services-basement:17.3.0
Install Repository and sync project
Open File
Show in Project Structure dialog
Failed to resolve: com.google.android.gms:play-services-tasks:17.3.0
Install Repository and sync project
Open File
Show in Project Structure dialog
Failed to resolve: com.google.firebase:firebase-common:17.3.0
Open File
Show in Project Structure dialog
Failed to resolve: com.google.firebase:firebase-iid:17.3.0
Open File
Show in Project Structure dialog
Failed to resolve: com.google.firebase:firebase-measurement-connector:17.3.0
Open File
Show in Project Structure dialog
Failed to resolve: com.google.android.gms:play-services-gcm:17.3.0
Install Repository and sync project
Open File
Show in Project Structure dialog
I tried updating the target and compile sdk to 28 and get an error for all of the support libraries being lower than target sdk but don't get an option to update them to the latest. I tried updating build tools to 28.0.2 and that also didn't help, and it weirdly doesn't prompt me that it is behind, I had to manually go look at the latest installed and put it. Not sure what to try next. Nothing changed and it just stopped working. Below are my gradle files. Thanks.
App gradle
buildscript {
repositories {
maven { url 'https://plugins.gradle.org/m2/' }
}
dependencies {
classpath 'gradle.plugin.com.onesignal:onesignal-gradle-plugin:0.8.2'
}
}
apply plugin: 'com.onesignal.androidsdk.onesignal-gradle-plugin'
repositories {
maven { url 'https://maven.google.com' }
}
apply plugin: 'com.android.application'
android {
compileSdkVersion 27
buildToolsVersion '28.0.2'
defaultConfig {
applicationId "removed"
manifestPlaceholders = [
onesignal_app_id : 'removed',
// Project number pulled from dashboard, local value is ignored.
onesignal_google_project_number: 'REMOTE'
]
minSdkVersion 19
targetSdkVersion 27
versionCode 50
versionName "2.6"
testInstrumentationRunner "android.support.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation 'com.android.support.constraint:constraint-layout:1.1.2'
implementation 'com.android.support:appcompat-v7:27.1.1'
implementation 'com.android.support:design:27.1.1'
implementation fileTree(include: ['*.jar'], dir: 'libs')
implementation 'com.android.support:support-v4:27.1.1'
implementation 'org.jbundle.util.osgi.wrapped:org.jbundle.util.osgi.wrapped.org.apache.http.client:4.1.2'
implementation 'com.android.support:design:27.1.1'
implementation 'com.mikepenz:fontawesome-typeface:4.6.0.3@aar'
implementation('com.mikepenz:materialdrawer:5.6.0@aar') {
transitive = true
}
implementation 'com.github.bumptech.glide:glide:3.7.0'
implementation 'com.android.support:support-v4:27.1.1'
implementation 'com.google.firebase:firebase-core:15.0.2'
implementation 'com.google.firebase:firebase-messaging:15.0.2'
implementation 'com.google.android.gms:play-services-maps:15.0.1'
implementation 'com.eminayar.panterdialog:panter-dialog:0.0.2.1'
implementation 'com.mikhaellopez:circularprogressbar:1.1.1'
implementation files('libs/core-3.2.1.jar')
implementation 'de.hdodenhof:circleimageview:2.1.0'
implementation 'com.afollestad:material-cab:0.1.12'
implementation 'com.sandrios.android:sandriosCamera:1.0.8'
implementation 'com.github.paolorotolo:appintro:4.1.0'
implementation 'com.wdullaer:materialdatetimepicker:3.5.1'
implementation 'com.onesignal:OneSignal:3.8.4'
implementation 'com.google.android.gms:play-services-location:15.0.1'
implementation 'com.google.android.gms:play-services-places:15.0.1'
implementation ('com.facebook.android:facebook-android-sdk:4.33.0') {
exclude(group: "com.google.zxing", module:"core")
}
implementation 'com.google.android.gms:play-services-auth:15.0.1'
implementation 'com.snapchat.kit.sdk:creative:1.0.2'
implementation 'com.snapchat.kit.sdk:core:1.0.2'
}
apply plugin: 'com.google.gms.google-services'
Project gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
jcenter()
mavenCentral()
maven { url "https://maven.google.com" }
maven { url "https://storage.googleapis.com/snap-kit-build/maven" }
google()
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.4'
classpath 'com.google.firebase:firebase-plugins:1.0.4'
classpath 'com.google.gms:google-services:4.0.1'
}
}
allprojects {
repositories {
jcenter()
mavenCentral()
maven { url "https://maven.google.com" }
maven { url "https://storage.googleapis.com/snap-kit-build/maven" }
google()
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Upvotes: 0
Views: 1078
Reputation: 80914
Update the firebase libraries:
implementation 'com.google.firebase:firebase-core:16.0.1'
implementation 'com.google.firebase:firebase-messaging:17.3.0'
and in the top level gradle file, add the google()
at the beginning under repositories
:
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
jcenter()
maven { url "https://storage.googleapis.com/snap-kit-build/maven" }
}
dependencies {
classpath 'com.android.tools.build:gradle:3.1.4'
classpath 'com.google.firebase:firebase-plugins:1.0.4'
classpath 'com.google.gms:google-services:4.0.1'
}
}
allprojects {
repositories {
google()
jcenter()
maven { url "https://storage.googleapis.com/snap-kit-build/maven" }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
Upvotes: 2