Firebase实时DB Pro Guard异常

时间:2018-11-23 13:54:53

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

对于Firebase,我有一个很大的问题要提防。当我从Gradle激活职业后卫时。我收到此错误;

java.lang.Exception: java.lang.RuntimeException: Uncaught exception in Firebase Database runloop (3.0.0). Please report to firebase-database-client@google.com
    at android.support.v7.iy$1$1.run(SourceFile:98)
    at android.os.Handler.handleCallback(Handler.java:873)
    at android.os.Handler.dispatchMessage(Handler.java:99)
    at android.os.Looper.loop(Looper.java:193)
    at android.app.ActivityThread.main(ActivityThread.java:6669)
    at java.lang.reflect.Method.invoke(Native Method)
    at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
    at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)
Caused by: java.lang.NoSuchMethodError: No virtual method object()Lorg/json/JSONStringer; in class Landroid/support/v7/bub; or its super classes (declaration of 'android.support.v7.bub' appears in base.apk)
    at android.support.v7.od.a(SourceFile:69)
    at android.support.v7.od.a(SourceFile:58)
    at android.support.v7.od.a(SourceFile:38)
    at android.support.v7.jx.a(SourceFile:231)
    at android.support.v7.jn.b(SourceFile:243)
    at android.support.v7.jn.a(SourceFile:117)
    at android.support.v7.ju.a(SourceFile:1177)
    at android.support.v7.ju.a(SourceFile:1164)
    at android.support.v7.ju.c(SourceFile:1116)
    at android.support.v7.ju.j(SourceFile:1159)
    at android.support.v7.ju.a(SourceFile:310)
    at android.support.v7.jn.a(SourceFile:217)
    at android.support.v7.jn.d(SourceFile:210)
    at android.support.v7.jn.c(SourceFile:182)
    at android.support.v7.jn.a(SourceFile:132)
    at android.support.v7.jx.a(SourceFile:256)
    at android.support.v7.jx.c(SourceFile:303)
    at android.support.v7.jx.a(SourceFile:34)
    at android.support.v7.jx$c$2.run(SourceFile:86)
    at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:458)
    at java.util.concurrent.FutureTask.run(FutureTask.java:266)
    at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:301)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
    at java.lang.Thread.run(Thread.java:764)

        at com.myapplication.activity.CustomErrorActivity.onCreate(SourceFile:53)
        at android.app.Activity.performCreate(Activity.java:7136)
        at android.app.Activity.performCreate(Activity.java:7127)
        at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1271)
        at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2893)
        at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:3048)
        at android.app.servertransaction.LaunchActivityItem.execute(LaunchActivityItem.java:78)
        at android.app.servertransaction.TransactionExecutor.executeCallbacks(TransactionExecutor.java:108)
        at android.app.servertransaction.TransactionExecutor.execute(TransactionExecutor.java:68)
        at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1808)
        at android.os.Handler.dispatchMessage(Handler.java:106)
        at android.os.Looper.loop(Looper.java:193)
        at android.app.ActivityThread.main(ActivityThread.java:6669)
        at java.lang.reflect.Method.invoke(Method.java:-2)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:493)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:858)

我将这些设置用于职业守卫规则;

-dontwarn org.w3c.dom.**
-dontwarn org.joda.time.**
-dontwarn org.shaded.apache.**
-dontwarn org.ietf.jgss.**
-dontwarn com.firebase.**
-dontnote com.firebase.client.core.GaePlatform

-keepattributes Signature
-keepattributes *Annotation*
-keepattributes InnerClasses,EnclosingMethod

-keep class com.myapplication.** { *; }

-keep class com.firebase.** { *; }

-keepnames class com.fasterxml.jackson.** { *; }
-keepnames class javax.servlet.** { *; }
-keepnames class org.ietf.jgss.** { *; }

但是我无法解决此问题。

我尝试了这一行的解决方案。但是问题没有解决:https://stackoverflow.com/a/38348574/3412753

0 个答案:

没有答案