Max length of a string

Former Member
Former Member
Hi, what is the max length advised of a string ?

I had an error :
<Failed to invoke symbol >
in my method (split cf this topic ).

But I know that this is due to the length of my string that is very very long ... when using smaller strings it works.
and the system.println(mystr) failed in memory error.

then what is the max length advised for avoiding this errors.

thanks
  • I'm not sure that there is an actual limit aside from the memory available to your application. You should be able to determine if there is by creating a Data Field (16KB memory on most devices) with the smallest string you can create that causes the application to crash. Once you have the data field working, change the application type to Watch App (32KB memory on most devices) and see if it crashes.

    If it doesn't crash, then the string size is a function of the memory available. If it does, then it appears there is a limitation to the length of the string.

    Travis