Тип com.google.android.gms.common.internal.zzf упоминается как> интерфейс от - PullRequest
0 голосов
/ 04 ноября 2019

Я перенес приложение Android на AndroidX (из меню Refactor-> Migrate to androidX). Теперь, когда я запускаю приложение, оно работает нормально, но когда я пытаюсь сгенерировать подписанный файл .apk, я получаю сообщение об ошибке типа


Type com.google.android.gms.common.internal.zzf is referenced as an interface from com.google.android.gms.internal.zzcdb.

Type com.google.android.gms.common.internal.zzf is referenced as an interface from com.google.android.gms.internal.zzii.

Type com.google.android.gms.common.internal.zzf is referenced as an interface from com.google.android.gms.internal.zzcms.

enter image description here

Вот список зависимостей, которые я использую в своем приложении,

dependencies {
    implementation fileTree(dir: 'libs', include: ['*.jar'])
    implementation 'com.android.support:appcompat-v7:29.0.0'
    implementation 'com.android.support.constraint:constraint-layout:1.1.3'
    testImplementation 'junit:junit:4.12'
    androidTestImplementation 'com.android.support.test:runner:1.0.2'
    androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
    implementation('com.android.support:support-annotations:29.0.0')
    implementation "com.android.support:design:29.0.0"
    implementation 'com.android.support:support-v4:29.0.0'
    implementation "com.google.android.material:material:1.0.0"
    implementation 'com.google.android:flexbox:0.3.2'

    implementation 'com.android.support:multidex:1.0.3'

    implementation 'me.relex:circleindicator:1.2.2@aar' //For view pager circle

    implementation 'com.jakewharton:butterknife:10.2.0'
    annotationProcessor 'com.jakewharton:butterknife-compiler:10.2.0'

    implementation 'com.squareup.picasso:picasso:2.71828'
    implementation 'com.github.ybq:Android-SpinKit:1.1.0'

    implementation 'com.google.code.gson:gson:2.8.6'
    implementation 'com.squareup.okhttp3:okhttp:4.2.2'
    implementation 'com.squareup.retrofit2:converter-gson:2.6.2'
    implementation('com.squareup.retrofit2:retrofit:2.6.2') {
        exclude module: 'okhttp'
    }

    implementation project(":photoview")

    implementation 'com.google.android.gms:play-services:12.0.1'
    implementation 'com.google.firebase:firebase-messaging:20.0.0'
    implementation 'com.crashlytics.sdk.android:crashlytics:2.10.1'

    implementation 'com.google.android:flexbox:0.3.2'
    implementation('com.crashlytics.sdk.android:crashlytics:2.10.1@aar') {
        transitive = true;
    }

}

1 Ответ

1 голос
/ 04 ноября 2019

Это, вероятно, причина вашей проблемы:

implementation 'com.google.android.gms:play-services:12.0.1'

На самом деле эта зависимость очень устарела. На самом деле вы должны просто полностью удалить его и позволить firebase-сообщениям просто получить то, что ему нужно.

Если вам нужно использовать какую-то определенную библиотеку play-services, вам следует использовать одну из новых, более детальных, перечисленных здесь:

https://developers.google.com/android/guides/releases

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