Тип программы уже присутствует: android.support.v4.app.LoaderManager $ LoaderCallbacks - PullRequest
0 голосов
/ 01 ноября 2018

Я обновил свою андроид студию .. и я нашел много проблем в последней версии

Хотя существует много подобных вопросов, я проверил ответы на все вопросы, и ни один из них не помог мне!

ошибка: Тип программы уже присутствует: 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'

1 Ответ

0 голосов
/ 01 ноября 2018

Очистить все кэши и перестроить, изменив приведенные ниже вещи

  compileSdkVersion 27
  buildToolsVersion '27.0.3'
  .....
  targetSdkVersion 27
Добро пожаловать на сайт PullRequest, где вы можете задавать вопросы и получать ответы от других членов сообщества.
...