Android Question Error compiling

Juan Carlos Gutierrez

Member
Licensed User
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
Code: Copy
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:
Code: Copy
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
 
I think the error is actually in your Starter service. Can you post the code from that?

- Colin.
 
Upvote 0
If you open your project you'll see 2 tabs - "Main" & "Starter". Click on the Starter tab & copy the code from in there. Or, just zip up the whole project & post it on here. In the B4A IDE click on "File", then "Export as Zip".

- Colin.
 
Upvote 0

Similar Threads

  • Question Question
Android Question [Solved] Error msg
Replies
1
Views
3K
  • Question Question
Android Question msg error
Replies
2
Views
2K
  • Question Question
Android Question error msg
Replies
2
Views
2K
  • Question Question
Android Question Error Msg
Replies
0
Views
2K
Back
Top