Android Question ABMeter: NullPointerException

HugoSX2

Member
Licensed User
Longtime User
When I compile and install the ABMeter example without the debugger (Release) to my phone, it generates a NullPointerException every second time I start it.

What can I do to avoid this?
 

Attachments

  • ABMeter_Crash.jpg
    ABMeter_Crash.jpg
    233.8 KB · Views: 164

HugoSX2

Member
Licensed User
Longtime User
It's the original example code.

B4X:
Sub Activity_Create(FirstTime As Boolean)
    If FirstTime Then
        Activity.LoadLayout("2")
        MyCanvas.Initialize(Panel1)
        psTemp.Initialize(psTemp.TYPE_TEMPERATURE)
        psFakeTemp.Initialize(psFakeTemp.TYPE_MAGNETIC_FIELD)
    End If
   
    scale = Activity.Width
   
    InitDrawingTools
   
    GenerateBackground
    drawMe(MyCanvas)
End Sub
 
Upvote 0
Top