android - com.google.android.gms.common.internal.zzf 类型被引用为 > 接口
问题描述
我将我的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.
这是我在我的应用程序上使用的依赖项列表,
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;
}
}
解决方案
这可能是您的问题的原因:
implementation 'com.google.android.gms:play-services:12.0.1'
事实上,这种依赖关系已经过时了。实际上,您应该将其完全删除,然后让 firebase-messaging 只接收它需要的内容。
如果您需要使用任何特定的播放服务库,您应该使用此处列出的新的、更细化的库之一:
推荐阅读
- javascript - Tr 没有更新它的类
- sockets - 使用 hackney 和 HTTPoison 在连接池级别设置请求超时
- installation - Azure DevOps 服务器配置向导 - 设置 - 报告 - TF400402 错误
- php - ESP01-Apache 服务器使用 Post 发送数据到 .php 文件
- android - 字节缓冲区的大小和形状不匹配 TFLite Android Kotlin
- sorting - 除最后一个元素外的排序数组
- javascript - Javascript 等效于 HtmlWebpackPlugin?
- angular - Angular 微前端与 Angular 材料的联合
- vue.js - 即使移动到其他组件后,Router View 也会继续显示组件信息
- c - 如何使用 sd_bus_* 通过 tcp 连接到远程 dbus