0

Getting error: Program type already present: Android.arch.lifecycle.LiveData$1 first, it was showing Warning: Configuration 'compile' is obsolete and has been replaced with 'implementation' and 'api'

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:27.1.0'

    implementation 'com.android.support.constraint:constraint-layout:1.1.0'
    implementation 'com.google.firebase:firebase-auth:11.4.0'
    implementation 'com.google.firebase:firebase-database:11.4.0'
    implementation 'com.google.firebase:firebase-messaging:11.4.0'
    implementation 'com.android.support:support-v4:27.1.0'
    implementation 'com.google.android.gms:play-services-auth:11.4.0'
    implementation 'com.google.android.gms:play-services-ads:11.4.0'
    implementation 'com.google.android.gms:play-services-location:11.4.0'
    compile 'com.squareup.picasso:picasso:2.5.2' //for Inmobi
    compile name: 'adcolony-sdk-3.2.1', ext: 'aar'
    compile name: 'mmedia-6.4.0', ext: 'aar'
    compile name: 'mobvista_alphab', ext: 'aar'
    compile name: 'mobvista_appwall', ext: 'aar'
    compile name: 'mobvista_appwallext', ext: 'aar'
    compile name: 'mobvista_common', ext: 'aar'
    compile name: 'mobvista_interstitial', ext: 'aar'
    compile name: 'mobvista_mvdownloads', ext: 'aar'
    compile name: 'mobvista_mvjscommon', ext: 'aar'
    compile name: 'mobvista_mvnative', ext: 'aar'
    compile name: 'mobvista_nativeex', ext: 'aar'
    compile name: 'mobvista_offerwall', ext: 'aar'
    compile name: 'mobvista_playercommon', ext: 'aar'
    compile name: 'mobvista_reward', ext: 'aar'
    compile name: 'mobvista_videocommon', ext: 'aar'
    compile name: 'mobvista_videofeeds', ext: 'aar'

    testImplementation 'junit:junit:4.12'
    implementation 'com.firebaseui:firebase-ui-database:2.4.0'
    implementation 'com.android.support:cardview-v7:27.1.0'
    implementation 'com.android.support:recyclerview-v7:27.1.0'
    implementation 'com.android.support:design:27.1.0'


    androidTestImplementation 'com.android.support.test:runner:1.0.1'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.1'
}


apply plugin: 'com.google.gms.google-services'
Farhan Saikh
  • 111
  • 1
  • 16
  • 1
    See https://stackoverflow.com/questions/49056723/errorprogram-type-already-present-android-arch-lifecycle-livedata. – ADM Apr 30 '18 at 07:35
  • its giving me another error, after some changes,Error:Program type already present: android.support.v7.util.MessageThreadUtil$1$1 – Farhan Saikh Apr 30 '18 at 09:41
  • Possible duplicate of [Error:Program type already present: android.arch.lifecycle.LiveData](https://stackoverflow.com/questions/49056723/errorprogram-type-already-present-android-arch-lifecycle-livedata) – Edric May 31 '18 at 13:07

1 Answers1

0

there are the some internal conflict with firebase ui dependancy thats why this error is coming up, may be it will be removed from future update.

i have soled this error by adding following dependency line in app level gradle file implementation "android.arch.core:runtime:1.1.1"

Hope so it will someone how facing same problem

Swapnil Musale
  • 182
  • 1
  • 15