【问题标题】:Unable to generate signed APK with firebase无法使用 firebase 生成签名的 APK
【发布时间】:2017-06-06 12:39:32
【问题描述】:

因此,在我将这两个 Firebase 库添加到我的项目之前,我能够生成签名的 APK:

apply plugin: 'com.google.firebase.firebase-perf'


compile 'com.google.firebase:firebase-database:10.2.6'
compile 'com.google.firebase:firebase-perf:10.2.6'

这是我在尝试生成签名 APK 时遇到的错误:

Information:Gradle tasks [:app:assembleRelease]
Warning:com.google.firebase.appindexing.internal.zzd$zzb: can't find referenced method 'android.os.IInterface zzwW()' in program class com.google.firebase.appindexing.internal.zzc
Warning:com.google.firebase.appindexing.internal.zzf: can't find referenced method 'com.google.android.gms.tasks.Task doWrite(com.google.android.gms.internal.zzabn)' in program class com.google.firebase.appindexing.internal.zzf$zza
Warning:there were 2 unresolved references to program class members.
Warning:Exception while processing task java.io.IOException: Please correct the above warnings first.
Error:java.lang.RuntimeException: Job failed, see logs for details
Error:java.io.IOException: Please correct the above warnings first.
Information:BUILD FAILED in 2m 50s
Information:2 errors
Information:4 warnings
Information:See complete output in console

任何帮助表示赞赏,谢谢。

【问题讨论】:

  • 您是否也在您的应用中使用 Firebase App Indexing?错误消息使它听起来像是在那里。
  • @DougStevenson 实际上,每当我使用 10.2.6 或更高版本时,我都无法生成签名的 apk
  • 所有 Firebase 和 Play 服务依赖项的所有版本是否完全相同?
  • @DougStevenson 是的

标签: android firebase firebase-realtime-database proguard android-proguard


【解决方案1】:

只需将这些行添加到您的 proguard 文件中即可。

-dontwarn com.google.firebase.appindexing.internal.**
-keep class com.google.firebase.appindexing.internal.** { *; }

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-12-16
    • 2020-06-29
    • 1970-01-01
    • 1970-01-01
    • 2017-02-19
    相关资源
    最近更新 更多