Android Question false try error report

John Sparrow

Member
Licensed User
Longtime User
Hi

I am getting the following error. It is in Sub Globals. There is no try or catch in there just a load of DIM statements. I have searched for 'try' and 'catch' as part words but there is nothing like that. Any ideas?

John


Parsing code. 0.08
Compiling code. 0.11
Compiling layouts code. 0.02
Generating R file. 0.08
Compiling generated Java code. Error
B4A line: 493
End Sub
javac 1.7.0_25
src\com\visualsolve\SeeTheDirection\main.java:7754: error: 'try' without 'catch' or 'finally'
try {
^
1 error
 

LucaMs

Expert
Licensed User
Longtime User
the problem is in:

B4X:
Dim AWSAddress As String = "https://s3-eu-west-
1.amazonaws.com/androidappfiles/VisualSolve+MasterFiles/"

You can't split a String in that way.

B4X:
Dim AWSAddress As String = "https://s3-eu-west-" & _
"1.amazonaws.com/androidappfiles/VisualSolve+MasterFiles/"

or write it on a single line.

But i have one question: do you need so much "Dim" in one Activity???

If so, use #Region to group them.
 
Upvote 0

John Sparrow

Member
Licensed User
Longtime User
Thanks for the reply. That is not the problem. That is a single line in my code. It just got to run over two lines in the text version.

Any other ideas?

John
 
Upvote 0

NJDude

Expert
Licensed User
Longtime User
There's nothing wrong with the code you posted, the problem must be somewhere else on your code, but to better help you, you have to post ACTUAL EXECUTABLE CODE (your project) and indicate what extra libraries you're using.
 
Upvote 0

galimpic

Member
Licensed User
Longtime User
I was getting the same error, the reason was that I wrote just "Else" instead of "Case Else" in a Select statement. Strange, but true :)
 
Upvote 0
Top