1

Even after the presence of correct import in Kotlin file, in firebase, I am getting NullPointerException in firebase crashalytics, and it's more in number.

Images are added as part of proof for line numbers, in hastbin or code format i cant add line numbers.

From onViewCreatet API is called, and on line 311, progress.hide() is there from API Response function.

contentLoadingProgressBar in XML

Progress bar made hidden in API response from Kotlin file

Firebase crash for null pointer exception

Arth Tilva
  • 2,447
  • 19
  • 39
  • 1
    Please donot post images, copy and paste the code and surround them in the triple backticks (`). And post the relevant Kotlin sources as well, that directly connects to progress variable. ā€“ Animesh Sahu Oct 28 '20 at 17:47
  • 1
    Iā€™m voting to close this question because code should be share with the appropriate format such as markdown or tools such as pastebin or similar ā€“ cutiko Oct 28 '20 at 19:41
  • You have a null pointer exception. This question is a duplicate https://stackoverflow.com/q/218384/2350083 ā€“ Jon Oct 29 '20 at 04:05

1 Answers1

1

Would be helpful if you posted the whole code, but I think the problem is that you are calling .hide() on progress before the onViewCreated() override method, so that's why progress is null when returned by findViewById().

Boba0514
  • 172
  • 1
  • 1
  • 14