Android Question Error in debug mode

timwil

Active Member
Licensed User
Longtime User
I am having an issue compiling in debug mode.

I have a screen shot and have zipped the project to include but do not see any way to upload either or both
 

timwil

Active Member
Licensed User
Longtime User
I see how to add it in a follow up post just not in the create post....
 

Attachments

  • error.jpg
    error.jpg
    127.6 KB · Views: 180
  • themovement242.zip
    431.6 KB · Views: 208
Upvote 0

MarkusR

Well-Known Member
Licensed User
Longtime User
i can't test, it used additional librarys that i not have.
 
Upvote 0

Erel

B4X founder
Staff member
Licensed User
Longtime User
You are hitting a Java limit related to the size of a single sub.

Truth is that it would have been better to rewrite the probematic subs completely. You should never write such code. It is error-prone and impossible to maintain.

Small example to help you remove several hundreds of lines:
B4X:
Private Sub determine_max_len
   Dim vers As List = Array(ver1, ver2, ver3, ver4, ver5, ver6, ver7, ver8, ver9, ver10, ver11, _
       ver12, ver13, ver14, ver15, ver16, ver17, ver18, ver19, ver20, ver21, ver22, ver23, ver24, ver25, _
       ver26, ver27, ver28, ver29, ver30, ver31, ver32, ver33, ver34, ver35, ver36, ver37, ver38, ver39, ver40)
       
   Dim len As Int = dat.Length
   Dim errorLevelAndIndex As Map = CreateMap("L": 64, "M": 65, "Q": 66, "H": 67)
   If errorLevelAndIndex.ContainsKey(error_level) Then
       Dim index As Int = errorLevelAndIndex.Get(error_level)
       If len >= 0 Then version_no = 1
       For i = 0 To vers.Size - 1
           Dim v() As Int = vers.Get(i)
           If len > v(index) Then version_no = i + 2
       Next
   End If
 
Upvote 0
Top