i could put the data in an external file and the read the file item into the array?
but how would include the file in the program apk package.
or maybe the MAP would somehow solve this? But i would still have to include the file?
The issue is the code is to large for the IDE editor. It gives the same error in B4J. I put the complete array in just one sub and it started to compile and about 2 seconds in, it gave the error: Code To Large. This is not a limit of Java or B4A but may be a limit to the IDE or compiler. You will have to read it in from a file. Place the file with this data in the project folder in the Files folder. Then you can get the data with:
B4X:
Dim MyList As List
MyList = File.ReadList(File.DirAssets, "yourfilename.txt")
In your project folder
c:\path_to_project\
You will find a folder FILES
Put the file into this folder and then compile your project... See this example. It has your data in a file in files folder and load the data to a listview. ALL 38000 lines...