Please I am new in B4A and I try to compile my project but I have this error message, I did all the steps to configure the IDE but always have the error
My code is:
B4X:
B4A version: 7.01
Parsing code. (0.02s)
Compiling code. (0.15s)
Compiling layouts code. (0.01s)
Organizing libraries. (0.00s)
Generating R file. (0.06s)
Compiling debugger engine code. Error
B4A line: 29
End Sub
javac 1.8.0_144
shell\src\b4a\example\starter_subs_0.java:25: error: incompatible types: void cannot be converted to Throwable
throw Debug.ErrorCaught(e);
^
1 error
My code is:
B4X:
Sub Process_Globals
'These global variables will be declared once when the application starts.
'These variables can be accessed from all modules.
Dim UDPSocket1 As UDPSocket
End Sub
Sub Globals
'These global variables will be redeclared each time the activity is created.
'These variables can only be accessed from this module.
Dim Packet As UDPPacket
Dim msg As String
End Sub
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
'Activity.LoadLayout("Layout1")
UDPSocket1.Initialize("UDP", 0, 8000)
If FirstTime Then
Dim fdata() As Byte
fdata = "ini".GetBytes("UTF8")
Packet.Initialize(fdata, "10.48.5.1", "2130")
UDPSocket1.Send(Packet)
End If
End Sub
Sub Activity_Resume
End Sub
Sub Activity_Pause (UserClosed As Boolean)
End Sub
Sub UDP_PacketArrived (Packet1 As UDPPacket)
Dim msg1 As Char
msg = BytesToString(Packet1.Data, Packet1.Offset, Packet1.Length, "UTF8")
'msg1=msg.CharAt(17)
Log(msg)
Msgbox(msg,"dato")
End Sub