Android Question Unexpected error in compilation

GiovanniPolese

Well-Known Member
Licensed User
Longtime User
Hi to All
I met an unexpected error during compilation, as shown in the attached picture. I cannot figure out what happened. I compiled same code hundreds of times. Any hint?
Thanks in advance
 

Attachments

  • Problem.png
    Problem.png
    93.8 KB · Views: 47

teddybear

Well-Known Member
Licensed User
Hi to All
I met an unexpected error during compilation, as shown in the attached picture. I cannot figure out what happened. I compiled same code hundreds of times. Any hint?
Thanks in advance
The Public is incorrect in inline java, it should be the lowercase letter 'p' - public.
 
Upvote 1

GiovanniPolese

Well-Known Member
Licensed User
Longtime User
Yes... I cannot understand how it happened. I also tried to take that code away, and actually the error disappeared. But also correcting the "p" works.. Thanks a lot.
 
Upvote 0

Daestrum

Expert
Licensed User
Longtime User
If you paste code before you have #if java #endif to place it in the IDE applies the same casing as B4X code ie public > Public

'for' is another that it will change
 
Upvote 0

GiovanniPolese

Well-Known Member
Licensed User
Longtime User
Probably i did something like that, but it sounds strange. As a matter of fact I didn't paste any code to the "Main" module, in a B4xPages project. I think that it is obvious. Therefore (in theory) I couldn't have modified that java code, which is part of the predefined code that appears when you create such type of project. Moreover I don't know what is its purpose. In few words, I bet that I didn't modify that "p", either manually or with copy/paste. Moreover again, I never work on Main module, as it is clearly stated at its end. The only operation that may be suspected, is that actually I added a java code inside the B4xPages.MainPage (with #If JAVA / #EndIf). Then I took it away, seeing that it was not working (but was compiled). Never touched directly the Main module... Anyway, the problem is solved. Remains the doubt on the origin of the problem. Thanks to all again.
 
Upvote 0

teddybear

Well-Known Member
Licensed User
Remains the doubt on the origin of the problem.
I know that p was not modified by you, and also know that you did not do copy and paste because the Main module is from the B4xpages template. The most likely reason is that you accidentally deleted the # or this line (#if java) and then did undo(ctrl+z), the 'P' was formatted by IDE
 
Upvote 0
Top