0

Firebase InApp Messaging 测试消息停止在真实设备上出现,它们仅在模拟器上接收。我决定从 17.0.1 更新到最新版本 17.0.4。

实施 'com.google.firebase:firebase-inappmessaging-display:17.0.4'

但是,我在构建时收到此错误

Exception in thread "main" java.lang.NullPointerException: This method com/google/firebase/inappmessaging/internal/ProtoStorageClient.lambda$read$1(Lcom/google/firebase/inappmessaging/internal/ProtoStorageClient;Lcom/google/protobuf/Parser;)Lcom/google/protobuf/AbstractMessageLite; has a call to $closeResource(Throwable, AutoCloseable) method, but the type inference is null.
at com.google.common.base.Preconditions.checkNotNull(Preconditions.java:1079)
at com.google.devtools.build.android.desugar.TryWithResourcesRewriter$TryWithResourceVisitor.visitMethodInsn(TryWithResourcesRewriter.java:285)
at org.objectweb.asm.MethodVisitor.visitMethodInsn(MethodVisitor.java:485)
at com.google.devtools.build.android.desugar.ObjectsRequireNonNullMethodRewriter$ObjectsMethodInlinerMethodVisitor.visitMethodInsn(ObjectsRequireNonNullMethodRewriter.java:55)
at org.objectweb.asm.MethodVisitor.visitMethodInsn(MethodVisitor.java:485)
at com.google.devtools.build.android.desugar.LongCompareMethodRewriter$LongCompareMethodVisitor.visitMethodInsn(LongCompareMethodRewriter.java:52)
at org.objectweb.asm.MethodVisitor.visitMethodInsn(MethodVisitor.java:485)
at com.google.devtools.build.android.desugar.Java7Compatibility$UpdateBytecodeVersionIfNecessary.visitMethodInsn(Java7Compatibility.java:148)
at org.objectweb.asm.MethodVisitor.visitMethodInsn(MethodVisitor.java:485)
at com.google.devtools.build.android.desugar.InterfaceDesugaring$InterfaceInvocationRewriter.visitMethodInsn(InterfaceDesugaring.java:423)
at org.objectweb.asm.ClassReader.readCode(ClassReader.java:1600)
at org.objectweb.asm.ClassReader.readMethod(ClassReader.java:1126)
at org.objectweb.asm.ClassReader.accept(ClassReader.java:698)
at org.objectweb.asm.ClassReader.accept(ClassReader.java:500)
at com.google.devtools.build.android.desugar.Desugar.desugarClassesInInput(Desugar.java:477)
at com.google.devtools.build.android.desugar.Desugar.desugarOneInput(Desugar.java:361)
at com.google.devtools.build.android.desugar.Desugar.desugar(Desugar.java:314)
at com.google.devtools.build.android.desugar.Desugar.main(Desugar.java:711)

:app:transformClassesWithDesugarForDebug 失败

4

1 回答 1

0

我将我minSdkVersion的 from更改1721,此错误消失了。

于 2019-07-19T05:13:28.120 回答