How can I protect my theft code?
In an Android application, the obfuscated code makes it difficult to obtain the code through reverse engineering through your .APK, obfuscation is especially valuable when your application uses sensitive data within the code, such as verification of licenses.
To obfuscate your code in an android application regularly use Proguard (although there are other options).
link
Google's dx compiler converts ordinary jar files into files that run
on Android devices. By preprocessing the original jar files, ProGuard
can significantly reduce the file sizes and boost the run-time
performance of the code.
I add a tutorial to configure your Android project with obfuscation:
Using Proguard to obfuscate an Android application.
It is important to know that unfortunately there is no infallible method to avoid reverse engineering.