cimperia Active Member Licensed User Longtime User May 7, 2015 #1 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: Code: Copy 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: Code: Copy 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: Code: Copy 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.
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: Code: Copy 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: Code: Copy 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: Code: Copy 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.
Erel B4X founder Staff member Licensed User Longtime User May 8, 2015 #2 It is a bug and it is fixed for the next update. You can move it to Globals instead of Process_Globals to prevent it from being obfuscated.
It is a bug and it is fixed for the next update. You can move it to Globals instead of Process_Globals to prevent it from being obfuscated.
cimperia Active Member Licensed User Longtime User May 8, 2015 #3 OK thanks. I can't move "it" to Globals as the query is used in multiple activities, however I reverted to the regular string and it works fine.
OK thanks. I can't move "it" to Globals as the query is used in multiple activities, however I reverted to the regular string and it works fine.