【问题标题】:Program type already present: android.support.v4.app.LoaderManager$LoaderCallbacks程序类型已存在:android.support.v4.app.LoaderManager$LoaderCallbacks
【发布时间】:2018-11-01 23:48:38
【问题描述】:

我已经升级了我的android studio ..发现最新版本有很多问题

尽管存在许多类似的问题,但我检查了所有问题的答案,但没有一个对我有用!

错误: 程序类型已经存在:android.support.v4.app.LoaderManager$LoaderCallbacks

这是我在编译代码时遇到的错误:

Build.gradle 应用插件:'com.android.application'

android {
    compileSdkVersion 28
    buildToolsVersion '28.0.0'
    defaultConfig {
        applicationId 'com.ownmettro.androidecommerce'
        minSdkVersion 17
        targetSdkVersion 28
        versionCode 1
        versionName "1.0"
        multiDexEnabled true
        manifestPlaceholders = [onesignal_app_id: "11111111-1111-1111-1111-111111111111", onesignal_google_project_number: "REMOTE"]
    }
    repositories {
        mavenCentral()
    }
    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt')
        }
    }
    aaptOptions {
        cruncherEnabled = false
    }
    productFlavors {
    }
    lintOptions {
        abortOnError false
    }
    compileOptions {
        sourceCompatibility JavaVersion.VERSION_1_8
        targetCompatibility JavaVersion.VERSION_1_8

    }

    configurations.all {

        resolutionStrategy {

            force 'com.android.support:appcompat-v7:27.1.1'

            force 'com.android.support:design:27.1.1'

            force 'com.android.support:cardview-v7:27.1.1'

            force 'com.android.support:recyclerview-v7:27.1.1'

            force 'com.android.support:support-v4:27.1.1'

            force 'com.android.support:preference-v7:27.1.1'

            force 'com.android.support:preference-v14:27.1.1'

        }

    }
}

dependencies {
    implementation 'com.android.support:multidex:1.0.3'
    //noinspection GradleCompatible
    implementation 'com.android.support:appcompat-v7:27.1.1'
    implementation 'com.android.support:design:27.1.1'
    implementation 'com.android.support:cardview-v7:27.1.1'
    implementation 'com.android.support:recyclerview-v7:27.1.1'
    implementation 'com.android.support:support-v4:27.1.1'
    implementation 'com.android.support:preference-v7:27.1.1'
    implementation 'com.android.support:preference-v14:27.1.1'

    implementation 'com.github.bumptech.glide:glide:3.7.0'
    implementation 'com.nineoldandroids:library:2.4.0'
    implementation 'com.mcxiaoke.volley:library:1.0.19'
    implementation 'com.google.code.gson:gson:2.8.0'
    implementation 'com.squareup.retrofit2:retrofit:2.3.0'
    implementation 'com.squareup.retrofit2:converter-gson:2.3.0'
    implementation 'com.squareup.picasso:picasso:2.3.2'
    implementation 'com.squareup.okhttp3:okhttp:3.9.1'
    implementation 'com.squareup.okhttp3:logging-interceptor:3.9.1'

    implementation 'com.daimajia.slider:library:1.1.5@aar'
    implementation 'com.crystal:crystalrangeseekbar:1.1.1'
    implementation 'com.github.paolorotolo:appintro:4.1.0'
    implementation 'com.stripe:stripe-android:2.0.2'

    implementation 'com.braintreepayments:card-form:3.+'
    implementation 'com.braintreepayments.api:drop-in:3.+'
    implementation 'com.braintreepayments.api:braintree:2.+'
    implementation 'com.paypal.sdk:paypal-android-sdk:2.15.3'

    implementation 'com.facebook.android:facebook-android-sdk:4.+'
    implementation 'com.onesignal:OneSignal:3.8.3'

    implementation 'com.google.firebase:firebase-ads:12.0.1'
    implementation 'com.google.firebase:firebase-auth:12.0.1'
    implementation 'com.google.firebase:firebase-messaging:12.0.1'
    implementation 'com.google.android.gms:play-services-auth:12.0.1'
    implementation 'com.google.android.gms:play-services-maps:12.0.1'
    implementation 'com.google.android.gms:play-services-location:12.0.1'

    implementation 'com.google.firebase:firebase-auth:12.0.1'

    implementation 'com.github.clans:fab:1.6.2'

}


apply plugin: 'com.google.gms.google-services'

【问题讨论】:

  • 按双档并在 Android Studio 中输入LoaderCallbacks。您正在获取信息,哪些库具有相同的类。
  • 如何删除
  • 哪个库有相同的类?
  • android 库 27.1.1 和 28.0.0

标签: android android-studio retrofit


【解决方案1】:

清除所有缓存并通过更改以下内容重新构建

  compileSdkVersion 27
  buildToolsVersion '27.0.3'
  .....
  targetSdkVersion 27

【讨论】:

  • 很高兴听到它。@paraman babu 如果它有帮助,你也可以投票。快乐编码
猜你喜欢
  • 1970-01-01
  • 2018-09-25
  • 1970-01-01
  • 2019-12-11
  • 2018-12-25
  • 1970-01-01
  • 1970-01-01
  • 2019-01-25
  • 2019-07-13
相关资源
最近更新 更多