Flutter Release Build在Firebase上崩溃

jecbmhm3  于 2023-04-22  发布在  Flutter
关注(0)|答案(1)|浏览(198)

我正面临一个奇怪的问题,我的发布版本在安装时突然崩溃。例外情况是:

FATAL EXCEPTION: firebase-iid-executor
 Process: com.my.app, PID: 9100
    java.lang.NoSuchMethodError: No virtual method toInstant()Lorg/threeten/bp/Instant; in class Ljava/util/Date; or its super classes (declaration of 'java.util.Date' appears in /apex/com.android.runtime/javalib/core-oj.jar)
        at com.google.firebase.heartbeatinfo.HeartBeatInfoStorage.getFormattedDate(:148)
        at com.google.firebase.heartbeatinfo.HeartBeatInfoStorage.isSameDateUtc(:226)
        at com.google.firebase.heartbeatinfo.HeartBeatInfoStorage.shouldSendSdkHeartBeat(:236)
        at com.google.firebase.heartbeatinfo.HeartBeatInfoStorage.shouldSendGlobalHeartBeat(:252)
        at com.google.firebase.heartbeatinfo.DefaultHeartBeatController.getHeartBeatCode(:165)
        at com.google.firebase.iid.GmsRpc.setDefaultAttributesToBundle(:19)
        at com.google.firebase.iid.GmsRpc.startRpc(:1)
        at com.google.firebase.iid.GmsRpc.getToken(:1)
        at com.google.firebase.iid.FirebaseInstanceId.lambda$getInstanceId$2$FirebaseInstanceId(:1)
        at com.google.firebase.iid.FirebaseInstanceId$$Lambda$3.start(Unknown Source:10)
        at com.google.firebase.iid.RequestDeduplicator.getOrStartGetTokenRequest(:7)
        at com.google.firebase.iid.FirebaseInstanceId.lambda$getInstanceId$3$FirebaseInstanceId(:5)
        at com.google.firebase.iid.FirebaseInstanceId$$Lambda$0.then(Unknown Source:6)
        at com.google.android.gms.tasks.zze.run(:1)
        at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
        at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
        at com.google.android.gms.common.util.concurrent.zza.run(:2)
        at java.lang.Thread.run(Thread.java:919)

作为一个新手在Flutter,我不能理解这个崩溃。有人可以请确定的问题,我做错了什么,什么可以是这个崩溃的原因!
先谢了

mnemlml8

mnemlml81#

所以问题是我使用的是旧版本的flutter_local_notifications,导致这个崩溃的问题是旧版本跳过了这些文件!
我的旧版本是9.4.1,我升级到13.0.0,就是这样!
实际上我是在玩一些proguard和dexguard规则。所以这个包是因为旧版本的包而导致崩溃的。
干杯

相关问题