amplitude / Amplitude-Android

Native Android SDK for Amplitude
MIT License
164 stars 90 forks source link

NullPointerException : DeviceInfo.getVersionName #347

Closed gsrathoreniks closed 1 year ago

gsrathoreniks commented 1 year ago

Expected Behavior

Current Behavior

Throwing NullPointerExceptions for getVersionName()

Non-fatal Exception: java.lang.NullPointerException: Attempt to invoke virtual method 'i3.q$a i3.q.b()' on a null object reference
       at com.amplitude.api.DeviceInfo.getVersionName(DeviceInfo.java:287)
       at com.amplitude.api.AmplitudeClient.logEvent(AmplitudeClient.java:1010)
       at com.amplitude.api.AmplitudeClient.logEventSync(AmplitudeClient.java:885)
       at com.amplitude.api.AmplitudeClient.logEventSync(AmplitudeClient.java:867)
       at com.amplitude.api.AmplitudeClient.logEventSync(AmplitudeClient.java:831)
       at com.amplitude.api.AmplitudeClient.logEventSync(AmplitudeClient.java:816)

Possible Solution

Steps to Reproduce

  1. Logging events to amplitude, no specific steps.

Environment

liuyang1520 commented 1 year ago

Hi @gsrathoreniks , thanks for supporting us!

I noticed you are using an old version of this legacy Android SDK, our latest version is 2.38.3 and we have a lot of changes in between: https://github.com/amplitude/Amplitude-Android/compare/v2.26.0...main. Could you try the latest version?

Thanks!

kevinpagtakhan commented 1 year ago

Hi @gsrathoreniks did the new version help at all? Thank you

liuyang1520 commented 1 year ago

Closing this due to inactivity.