gpt4 book ai didi

android - 9.6.0 库中的 Firebase proguard 错误

转载 作者:太空狗 更新时间:2023-10-29 14:46:26 27 4
gpt4 key购买 nike

将 Firebase 更新到最新版本后,我开始在更新到 Firebase 9.6.0 后的发布版本中收到以下混淆器错误。

它在 Firebase 9.4.0 上运行良好,但在 9.6.0 中,我无法构建它。

错误信息:

Information:Gradle tasks [:app:assembleRelease]
Warning:com.google.firebase.messaging.FirebaseMessaging: can't find referenced method 'void zzsv(java.lang.String)' in program class com.google.firebase.iid.FirebaseInstanceId
Warning:com.google.firebase.messaging.FirebaseMessaging: can't find referenced method 'java.lang.String zzdi(android.content.Context)' in program class com.google.firebase.iid.zzf
Warning:com.google.firebase.messaging.FirebaseMessagingService: can't find referenced method 'android.content.Intent zzcwx()' in program class com.google.firebase.iid.FirebaseInstanceIdInternalReceiver
Warning:com.google.firebase.messaging.FirebaseMessagingService: can't find referenced method 'int zzab(android.content.Intent)' in program class com.google.firebase.iid.zzb
Warning:com.google.firebase.messaging.FirebaseMessagingService: can't find referenced method 'void zzble()' in program class com.google.firebase.messaging.FirebaseMessagingService
Warning:com.google.firebase.messaging.zza: can't find referenced method 'android.content.Intent zzi(android.content.Context,android.content.Intent)' in program class com.google.firebase.iid.FirebaseInstanceIdInternalReceiver
Warning:com.google.firebase.messaging.zzb: can't find referenced method 'void zzd(java.lang.String,java.lang.String,android.os.Bundle)' in program class com.google.android.gms.measurement.AppMeasurement
Warning:com.google.firebase.messaging.zzc: can't find referenced method 'int zzcl(android.os.Parcel)' in program class com.google.android.gms.common.internal.safeparcel.zza
Warning:com.google.firebase.messaging.zzc: can't find referenced method 'int zzcm(android.os.Parcel)' in program class com.google.android.gms.common.internal.safeparcel.zza
Warning:com.google.firebase.messaging.zzc: can't find referenced method 'int zzgm(int)' in program class com.google.android.gms.common.internal.safeparcel.zza
Warning:com.google.firebase.messaging.zzc: can't find referenced method 'int zzcn(android.os.Parcel)' in program class com.google.android.gms.common.internal.safeparcel.zzb
Warning:there were 11 unresolved references to program class members.
Warning:Exception while processing task java.io.IOException: Please correct the above warnings first.
Error:Execution failed for task ':app:transformClassesAndResourcesWithProguardForRelease'.
> java.io.IOException: Please correct the above warnings first.
Information:BUILD FAILED
Information:Total time: 17.56 secs
Information:1 error
Information:13 warnings
Information:See complete output in console

我的 Proguard 规则:

# Add project specific ProGuard rules here.
# By default, the flags in this file are appended to flags specified
# in C:\Users\parth\AppData\Local\Android\Sdk/tools/proguard/proguard-android.txt
# You can edit the include path and order by changing the proguardFiles
# directive in build.gradle.
#
# For more details, see
# http://developer.android.com/guide/developing/tools/proguard.html

# Add any project specific keep options here:

# If your project uses WebView with JS, uncomment the following
# and specify the fully qualified class name to the JavaScript interface
# class:
#-keepclassmembers class fqcn.of.javascript.interface.for.webview {
# public *;
#}

-dontwarn okio.**
-dontwarn com.squareup.picasso.**

#playservices

-keep class * extends java.util.ListResourceBundle {
protected Object[][] getContents();
}

-keep public class com.google.android.gms.common.internal.safeparcel.SafeParcelable {
public static final *** NULL;
}

-keepnames @com.google.android.gms.common.annotation.KeepName class *
-keepclassmembernames class * {
@com.google.android.gms.common.annotation.KeepName *;
}

-keepnames class * implements android.os.Parcelable {
public static final ** CREATOR;
}


#CardView


# http://stackoverflow.com/questions/29679177/cardview-shadow-not-appearing-in-lollipop-after-obfuscate-with-proguard/29698051
-keep class android.support.v7.widget.RoundRectDrawable { *; }

# Appcompat
-keep public class android.support.v7.widget.** { *; }
-keep public class android.support.v7.internal.widget.** { *; }
-keep public class android.support.v7.internal.view.menu.** { *; }

-keep public class * extends android.support.v4.view.ActionProvider {
public <init>(android.content.Context);
}





-keep class com.firebase.** { *; }
-keep class org.apache.** { *; }
-keepnames class com.fasterxml.jackson.** { *; }
-keepnames class javax.servlet.** { *; }
-keepnames class org.ietf.jgss.** { *; }
-dontwarn org.w3c.dom.** -dontwarn org.joda.time.** -dontwarn org.shaded.apache.** -dontwarn org.ietf.jgss.**

-keepnames class * implements android.os.Parcelable {
public static final ** CREATOR;
}
# Add this global rule
-keepattributes Signaturev

# This rule will properly ProGuard all the model classes in
# the package com.yourcompany.models. Modify to fit the structure
# of your app.
-keepclassmembers class trycodehub.com.model.** {
*;
}

-keepclassmembers enum io.smooch.core.model.** { *; }
-keep class com.google.gson.** { *; }
-keepclassmembers enum * { *; }
-keepattributes Signature
-keepattributes *Annotation*
-keep class java.awt.** { *; }

我的 gradle 依赖文件:

dependencies {
compile fileTree(include: ['*.jar'], dir: 'libs')
compile 'com.android.support:appcompat-v7:24.2.1'
compile 'com.android.support:design:24.2.1'
compile 'com.android.support:recyclerview-v7:24.2.1'
compile 'com.android.support:cardview-v7:24.2.1'
compile 'com.android.support:customtabs:24.2.1'
compile 'com.google.firebase:firebase-auth:9.6.0'
compile 'com.google.android.gms:play-services-auth:9.6.0'
compile 'com.google.firebase:firebase-crash:9.6.0'
compile 'com.google.firebase:firebase-database:9.6.0'
compile 'com.firebaseui:firebase-ui-database:0.6.0'
compile 'com.squareup.picasso:picasso:2.5.2'
compile 'com.amulyakhare:com.amulyakhare.textdrawable:1.0.1'
compile 'io.smooch:core:latest.release'
compile 'io.smooch:ui:latest.release'
testCompile 'junit:junit:4.12'
}
apply plugin: 'com.google.gms.google-services'

最佳答案

我建议回滚到 9.4.0,直到谷歌解决这个问题。

关于android - 9.6.0 库中的 Firebase proguard 错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/39715709/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com