Android Question Obfuscator and using Hooks (_onDestroy)

moster67

Expert
Licensed User
Longtime User
Hello, and I hope you are all safe in these hard times!

I have a "cannot find symbol" error when trying to compile a project in Release(obfuscated) mode:
Generating R file. (3.58s)
Compiling generated Java code. Error
javac 1.8.0_191
src\com\tillekesoft\kctwatch\main.java:1165: error: cannot find symbol
_kct.Destroy();
^
symbol: variable _kct
location: class main
Note: Some input files use or override a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
1 error

It gets an error here:
B4X:
#If JAVA

public void _onDestroy() {
    BA.Log("_onDestroy");
    super.onDestroy();
    _kct.Destroy();
}

#End IF

The "kct" object is declared under Process_Globals:
B4X:
Private kct As KctWatch

It compiles (and app works) fine when in Debug and normal Release (without obfuscation). The problem is Release(obfuscated)

I guess this is due to obfuscation. Any way I can resolve this?

Thanks.
 

moster67

Expert
Licensed User
Longtime User
Thanks Agraham! That sorted it out.
Always a pleasure to see you here on the forum and read your posts.
Take care.
 
Upvote 0
Top