Android Question [Closed] Error when compiling debuging

syerif

Active Member
Licensed User
Longtime User
hi, please help me

i got this error when compiling debuging, anyone can help me please...

best regrads

Error when compiling debuging:
Compiling debugger engine code.    Error
B4A line: 86
If Term = LastTerm And Force = False Then Return
shell\src\com\korlantas\polri\b4xsearchtemplate_subs_0.java:673: error: method solveBoolean in class RemoteObject cannot be applied to given types;
if (RemoteObject.solveBoolean("=",b4xsearchtemplate._term,__ref.getField(true,"_lastterm" /*RemoteObject*/ )) && RemoteObject.solveBoolean("=",_force,b4xsearchtemplate.__c.getField(true,"False"))) {
                ^
  required: String,RemoteObject[]
  found:    String,term,RemoteObject
  reason: varargs mismatch; term cannot be converted to RemoteObject
1 error
only showing the first 1 errors, of 3 total; use -Xmaxerrs if you would like to see more
 

Sagenut

Expert
Licensed User
Longtime User
Without seeing some of your code it's very hard to help you.
Anyway it looks like Term and LastTerm are not of the same kind (2 Strings, 2 Ints....).
Log then before comparison to see what they are.
 
Upvote 0

syerif

Active Member
Licensed User
Longtime User
Without seeing some of your code it's very hard to help you.
Anyway it looks like Term and LastTerm are not of the same kind (2 Strings, 2 Ints....).
Log then before comparison to see what they are.
Thanks, this error showing when debuging only, but success when compile to apk in release mode. Previously my code work in debug mode, but now error after update some sdk in list
 
Upvote 0

Sagenut

Expert
Licensed User
Longtime User
Thanks, this error showing when debuging only, but success when compile to apk in release mode. Previously my code work in debug mode, but now error after update some sdk in list
In this case I suggest you to make a new SDK folder and do not update anything using B4A SDK Manager.
Make a new folder to test without deleting your actual one.
Remember to point the new folder in Configuration Paths.
 
Upvote 0

syerif

Active Member
Licensed User
Longtime User
I attach my code, I have try your suggestion but still failed, i also install fresh B4A and environment need at other pc but still failed
Code
@Erel any suggestion please
best regards
 
Upvote 0

mangojack

Expert
Licensed User
Longtime User
I attach my code, I have try your suggestion but still failed, i also install fresh B4A and environment need at other pc but still failed

to upload your project , in the IDE File > Export As Zip
 
Upvote 0

mangojack

Expert
Licensed User
Longtime User
thanks for suggestion but when i attach it here it is too large

Is your project a B4XPages project ?

 
Upvote 0

syerif

Active Member
Licensed User
Longtime User
Is your project a B4XPages project ?

I am develop my project in default not b4xpages
 
Upvote 0

syerif

Active Member
Licensed User
Longtime User
Might be related to a name conflict between a module and one of those variables.


finally I found the problem, it was caused because I had a module with the name Term, it was strange because everything was fine before, the error occurred after I updated version B4A. Thank you all, especially @Erel are we not allowed to use module or variable names with the name Term?
 
Upvote 0

syerif

Active Member
Licensed User
Longtime User
You are allowed. The problem here is that there is a global variable named Term in B4XSearchTemplate and it confuses the compiler.
after i am searching at my project. i found some fact, i got module and image in dirAsset with same name Term, may be it caused my problem in debug mode, my question why it not error in release mode
 
Upvote 0
Top