Facebook App Event SDK 4.38.0在ViewHierarchy.setAppearanceOfView中引发NPE

时间:2018-11-14 10:49:24

标签: java android facebook facebook-audience-network

我在使用facebook sdk的一个应用程序中遇到问题。在将SDK从4.27.0升级到4.38.0后,Fabric开始记录此致命异常。我不知道它何时或如何发生,因为我自己无法复制它。升级Facebook SDK后,也许有些人遇到了这个问题。

Fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'boolean android.graphics.Bitmap.compress(android.graphics.Bitmap$CompressFormat, int, java.io.OutputStream)' on a null object reference
   at com.facebook.appevents.codeless.internal.ViewHierarchy.setAppearanceOfView(ViewHierarchy.java:182)
   at com.facebook.marketing.internal.ButtonIndexer$ViewProcessor.getClickableElementsOfView(ButtonIndexer.java:197)
   at com.facebook.marketing.internal.ButtonIndexer$ViewProcessor.getClickableElementsOfView(ButtonIndexer.java:206)
   at com.facebook.marketing.internal.ButtonIndexer$ViewProcessor.getClickableElementsOfView(ButtonIndexer.java:206)
   at com.facebook.marketing.internal.ButtonIndexer$ViewProcessor.getClickableElementsOfView(ButtonIndexer.java:206)
   at com.facebook.marketing.internal.ButtonIndexer$ViewProcessor.getClickableElementsOfView(ButtonIndexer.java:206)
   at com.facebook.marketing.internal.ButtonIndexer$ViewProcessor.getClickableElementsOfView(ButtonIndexer.java:206)
   at com.facebook.marketing.internal.ButtonIndexer$ViewProcessor.getClickableElementsOfView(ButtonIndexer.java:206)
   at com.facebook.marketing.internal.ButtonIndexer$ViewProcessor.getClickableElementsOfView(ButtonIndexer.java:206)
   at com.facebook.marketing.internal.ButtonIndexer$ViewProcessor.getClickableElementsOfView(ButtonIndexer.java:206)
   at com.facebook.marketing.internal.ButtonIndexer$ViewProcessor.getClickableElementsOfView(ButtonIndexer.java:206)
   at com.facebook.marketing.internal.ButtonIndexer$ViewProcessor.getClickableElementsOfView(ButtonIndexer.java:206)
   at com.facebook.marketing.internal.ButtonIndexer$ViewProcessor.getClickableElementsOfView(ButtonIndexer.java:206)
   at com.facebook.marketing.internal.ButtonIndexer$ViewProcessor.getClickableElementsOfView(ButtonIndexer.java:206)
   at com.facebook.marketing.internal.ButtonIndexer$ViewProcessor.getClickableElementsOfView(ButtonIndexer.java:206)
   at com.facebook.marketing.internal.ButtonIndexer$ViewProcessor.getClickableElementsOfView(ButtonIndexer.java:206)
   at com.facebook.marketing.internal.ButtonIndexer$ViewProcessor.getClickableElementsOfView(ButtonIndexer.java:206)
   at com.facebook.marketing.internal.ButtonIndexer$ViewProcessor.getClickableElementsOfView(ButtonIndexer.java:206)
   at com.facebook.marketing.internal.ButtonIndexer$ViewProcessor.attachListeners(ButtonIndexer.java:166)
   at com.facebook.marketing.internal.ButtonIndexer$ViewProcessor.process(ButtonIndexer.java:161)
   at com.facebook.marketing.internal.ButtonIndexer$ViewProcessor.run(ButtonIndexer.java:145)
   at android.os.Handler.handleCallback(Handler.java:754)
   at android.os.Handler.dispatchMessage(Handler.java:95)
   at android.os.Looper.loop(Looper.java:163)
   at android.app.ActivityThread.main(ActivityThread.java:6221)
   at java.lang.reflect.Method.invoke(Method.java)
   at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:904)
   at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:794)

1 个答案:

答案 0 :(得分:3)