Android Question List of pitfalls for obfuscated compilation?

wimpie3

Well-Known Member
Licensed User
Longtime User
My code works fine in debug and release mode. However, I get tons of errors in obfuscation mode (the errors occur while running the app). Is there a list of potential pitfalls? Things to check?
 

wimpie3

Well-Known Member
Licensed User
Longtime User
OK, and what about CallSubDelayed? What about the reflection library?

And what about this: CallSub(variablename+"_underscore")?
 
Upvote 0

wimpie3

Well-Known Member
Licensed User
Longtime User
Seems there are issues with the reflector library as well in obfuscation mode:

Dim reflect As Reflector
reflect.Target = lbl
reflect.SetOnTouchListener("dayTouch")

When I touch the label, I get an error in the console window: "raiseEvent for daytouch returned null"
 
Upvote 0

wimpie3

Well-Known Member
Licensed User
Longtime User
Ok, problem solved. When renaming the sub to "day_Touch", everything worked fine. So Erel, this might be a bug... subs in SetOnTouchListener definitely need an underscore.
 
Upvote 0

wimpie3

Well-Known Member
Licensed User
Longtime User
OK, but if you "autocorrect" this problem in this case:

CallSub(Me, "Hello")

why not do the same for

SetOnTouchListener("dayTouch")
 
Upvote 0
Top