com.google. android .gms.internal.measurement.zzdf ошибка в android - PullRequest
0 голосов
/ 21 июня 2020

Когда я перенес проект на android -x, я получил ошибку: Тип программы уже присутствует: android .support.v4.media.MediaBrowserCompat $ ConnectionCallback $ ConnectionCallbackInternal Я погуглил и закончил на странице разработчика о «Устранении повторяющихся ошибок класса», но я все еще не могу это исправить. Я добавил это в свой gradle.properties android .useAndroidX = true android .enableJetifier = false , но это не решает мою проблему. Помощь будет очень полезна! , как я могу решить эту проблему?

build.gradle (проект)

buildscript {
    repositories {
        jcenter()
        maven {
            url 'https://maven.google.com/'
            name 'Google'
        }
        maven {
            url 'https://maven.fabric.io/public'
        }
        google()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:3.2.1'
        classpath 'com.google.gms:google-services:3.2.1'
        classpath 'io.fabric.tools:gradle:1.31.2'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        jcenter()
        google()
        maven {
            url 'https://maven.google.com/'
            name 'Google'
        }
    }
}

task clean(type: Delete) {

    delete rootProject.buildDir
}

build.gradle (app)

apply plugin: 'com.android.application'
apply plugin: 'io.fabric'

android {

    compileSdkVersion 28
    buildToolsVersion '28.0.3'

    defaultConfig {
        applicationId "com.orin.music"
        minSdkVersion 16
        targetSdkVersion 28
        versionCode 16
        versionName '1.4'
        multiDexEnabled true
        vectorDrawables.useSupportLibrary = true
    }

    dexOptions {

        jumboMode true
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

    lintOptions {
        checkReleaseBuilds false
        // Or, if you prefer, you can continue to check for errors in release builds,
        // but continue the build even when errors are found:
        abortOnError false
    }

    productFlavors {
    }
}

dependencies {
    implementation  fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'com.android.volley:volley:1.1.1'
    implementation 'com.github.chrisbanes.photoview:library:1.2.3'
    implementation 'com.facebook.android:facebook-android-sdk:4.35.0'
    implementation 'com.pkmmte.view:circularimageview:1.1'
    implementation 'com.mikhaellopez:circularimageview:3.2.0'
    implementation 'com.melnykov:floatingactionbutton:1.3.0'
    implementation 'com.squareup.okhttp:okhttp:2.5.0'
    implementation 'com.github.bumptech.glide:glide:3.7.0'
    implementation 'androidx.appcompat:appcompat:1.0.0'
    implementation 'androidx.vectordrawable:vectordrawable-animated:1.0.0'
    implementation 'androidx.mediarouter:mediarouter:1.0.0'
    implementation 'androidx.browser:browser:1.0.0'
    implementation 'com.google.android.material:material:1.0.0'
    implementation 'androidx.recyclerview:recyclerview:1.0.0'
    implementation 'androidx.cardview:cardview:1.0.0'
    implementation 'com.balysv:material-ripple:1.0.2'
    implementation 'com.squareup.picasso:picasso:2.5.2'
    implementation 'com.google.firebase:firebase-core:17.4.3'
    implementation 'com.google.firebase:firebase-ads:19.2.0'
    implementation 'com.google.firebase:firebase-messaging:20.2.1'
    implementation 'com.google.firebase:firebase-analytics:17.4.3'
    implementation 'com.google.android.gms:play-services-gcm:17.0.0'
    implementation 'com.google.android.gms:play-services-ads:19.2.0'
    implementation 'com.google.android.gms:play-services-location:17.0.0'
    implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
    implementation 'com.github.smarteist:autoimageslider:1.3.2'
    //implementation 'com.android.support:support-emoji-appcompat:28.0.0'
    //implementation "com.android.support:support-emoji:28.0.0"

    implementation  files('libs/YouTubeAndroidPlayerApi.jar')
}

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

Ответы [ 2 ]

1 голос
/ 21 июня 2020

проект gradle.build

buildscript {
    repositories {
        google()
        jcenter()
    }
    dependencies {
        classpath 'com.android.tools.build:gradle:4.0.0'
        classpath 'com.google.gms:google-services:4.3.3'
        classpath 'com.google.firebase:firebase-crashlytics-gradle:2.1.1'
        // NOTE: Do not place your application dependencies here; they belong
        // in the individual module build.gradle files
    }
}

allprojects {
    repositories {
        google()
        jcenter()
    }
}
task clean(type: Delete) {

    delete rootProject.buildDir
}

и приложение gradle.build

apply plugin: 'com.android.application'
apply plugin: 'com.google.gms.google-services'
apply plugin: 'com.google.firebase.crashlytics'

android {

    compileSdkVersion 28
    buildToolsVersion '28.0.3'

    defaultConfig {
        applicationId "com.orin.music"
        minSdkVersion 16
        targetSdkVersion 28
        versionCode 16
        versionName '1.4'
        multiDexEnabled true
        vectorDrawables.useSupportLibrary = true
    }

    dexOptions {

        jumboMode true
    }

    buildTypes {
        release {
            minifyEnabled false
            proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
        }
    }

    lintOptions {
        checkReleaseBuilds false
        // Or, if you prefer, you can continue to check for errors in release builds,
        // but continue the build even when errors are found:
        abortOnError false
    }

    productFlavors {
    }
}

dependencies {
    implementation  fileTree(include: ['*.jar'], dir: 'libs')
    implementation 'com.android.volley:volley:1.1.1'
    implementation 'com.github.chrisbanes.photoview:library:1.2.3'
    implementation 'com.facebook.android:facebook-android-sdk:4.35.0'
    implementation 'com.pkmmte.view:circularimageview:1.1'
    implementation 'com.mikhaellopez:circularimageview:3.2.0'
    implementation 'com.melnykov:floatingactionbutton:1.3.0'
    implementation 'com.squareup.okhttp:okhttp:2.5.0'
    implementation 'com.github.bumptech.glide:glide:3.7.0'
    implementation 'androidx.appcompat:appcompat:1.1.0'
    implementation 'androidx.vectordrawable:vectordrawable-animated:1.1.0'
    implementation 'androidx.mediarouter:mediarouter:1.1.0'
    implementation 'androidx.browser:browser:1.2.0'
    implementation 'com.google.android.material:material:1.1.0'
    implementation 'androidx.recyclerview:recyclerview:1.1.0'
    implementation 'androidx.cardview:cardview:1.0.0'
    implementation 'com.balysv:material-ripple:1.0.2'
    implementation 'com.squareup.picasso:picasso:2.71828'
    implementation 'com.google.firebase:firebase-core:17.4.3'
    implementation 'com.google.firebase:firebase-ads:19.2.0'
    implementation 'com.google.firebase:firebase-messaging:20.2.1'
    implementation 'com.google.firebase:firebase-analytics:17.4.3'
    implementation 'com.google.android.gms:play-services-gcm:17.0.0'
    implementation 'com.google.android.gms:play-services-ads:19.2.0'
    implementation 'com.google.android.gms:play-services-location:17.0.0'
    implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'
    implementation 'com.github.smarteist:autoimageslider:1.3.2'
implementation  files('libs/YouTubeAndroidPlayerApi.jar')
}
0 голосов
/ 21 июня 2020

все эти библиотеки устарели, и io.fabri c больше не требуется для firebase и googl.gms. Плагины тоже старые. Во время теста я не могу загрузить ни плагин io.fabri c 1.31.2

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