I have a project where I have the following query stored in a Smart String Literal. The query is actually much longer, but the issue will reveal itself with this cut-down version:
I am not trying to obfuscate this variable at this stage, but when I compile the project with "Release (obfuscated)", at run time the app fails with the current error:
It looks like the new lines characters '\n' get messed up ...
If I use this query where the text holds on one line, the apps runs OK:
If I remove the "_" from the variable name, the issue persists, as it looks that the issue is with the new line character in obfuscated mode.
B4X:
Sub Process_Globals
Private Const SELECT_ALL As String = _
$"SELECT
id
, kt_mem_deck
, kt_name
FROM
v_stacktestsettings"$
End Sub
I am not trying to obfuscate this variable at this stage, but when I compile the project with "Release (obfuscated)", at run time the app fails with the current error:
B4X:
android.database.sqlite.SQLiteException: unrecognized token: "\" (code 1): , while compiling: SELECT\n id\n , kt_mem_deck\n , kt_name\n FROM\n v_stacktestsettings
It looks like the new lines characters '\n' get messed up ...
If I use this query where the text holds on one line, the apps runs OK:
B4X:
Private Const SELECT_ALL As String = _
$"SELECT id, kt_mem_deck, kt_name FROM v_stacktestsettings"$
If I remove the "_" from the variable name, the issue persists, as it looks that the issue is with the new line character in obfuscated mode.