code too large for try statement ?

varayut

Member
Licensed User
Dear Erel,
I 've just found a problem in compiling my code. Previously my code size never shown any problem in J2ME,VB6,html or PHP.It run through well.
*********************************************
Compiling code. 0.12
Generating R file. 0.00
Compiling generated Java code. Error
B4A line: 1668
End Sub
javac 1.6.0_20
src\com\xxx\xxx\main.java:6676: code too large for try statement
catch (Exception e) {
^
1 error
*********************************************
If there is a restriction in android module that one subroutine is never larger than 1024k or something. So I have to divide my code to many pieces. I have tried version 1.7 , 1.78 , 1.8 already.
Thank for your help
 

Erel

Administrator
Staff member
Licensed User
There is a Java limit of 64kb of bytecode per method. I never encountered it. How large is this Sub?

I guess that you are running in Debug mode which injects additional code.
 
Top