Android Question Java error while compiling with no errors in the IDE

Alessandro71

Well-Known Member
Licensed User
Longtime User
no warning or messages in the IDE
apparently good code (or am I missing something really big...)
while compiling I get the following error

B4X:
Compiling generated Java code.    Error
B4A line: 8
Public range0100 As LinearityRange = CreateLinear
src\b4a\example\testmodule.java:53: error: cannot find symbol
_range0100 = _createlinearityrange(_ba,(int) (0),(int) (100));
                                   ^
  symbol:   variable _ba
  location: class testmodule

sample (empty) project attached
 

Attachments

  • JavaError.zip
    10.3 KB · Views: 131
Solution
B4X:
'Code module
'Subs in this code module will be accessible from all modules.
Sub Process_Globals
    'These global variables will be declared once when the application starts.
    'These variables can be accessed from all modules.

    Type LinearityRange (startvalue As Int, endvalue As Int)
'    Public range0100 As LinearityRange = CreateLinearityRange(0, 100)   ' TAKE THIS OUT OF HERE

End Sub


B4X:
Private Sub Button1_Click
    xui.MsgboxAsync("Hello world!", "B4X")
    Dim range0100 As LinearityRange = testmodule.CreateLinearityRange(0, 100)   ' AND PUT IT HERE
    Log(range0100.startvalue)
    
End Sub

drgottjr

Expert
Licensed User
Longtime User
B4X:
'Code module
'Subs in this code module will be accessible from all modules.
Sub Process_Globals
    'These global variables will be declared once when the application starts.
    'These variables can be accessed from all modules.

    Type LinearityRange (startvalue As Int, endvalue As Int)
'    Public range0100 As LinearityRange = CreateLinearityRange(0, 100)   ' TAKE THIS OUT OF HERE

End Sub


B4X:
Private Sub Button1_Click
    xui.MsgboxAsync("Hello world!", "B4X")
    Dim range0100 As LinearityRange = testmodule.CreateLinearityRange(0, 100)   ' AND PUT IT HERE
    Log(range0100.startvalue)
    
End Sub
 
Upvote 1
Solution
Top