paranoid: [0.3.x] Release app crashes with ClassNotFoundException for DeobfuscatorHelper

Thanks @MichaelRocks for an excellent tool!

I have an Android library project (AAR) that’s using paranoid. It worked fine with 0.2.5 - but after I upgraded to 0.3.2, I hit this runtime error in the app that’s using that library AAR:

java.lang.ClassNotFoundException: Didn't find class "io.michaelrocks.paranoid.DeobfuscatorHelper" on path: DexPathList..

NOTE: this only in the release build (with R8 turned on)

I didn’t have time to dig into this problem, but 0.3.0 is the first version with this problem. Are some required R8 rules missing?

About this issue

  • Original URL
  • State: open
  • Created 4 years ago
  • Comments: 20 (8 by maintainers)

Most upvoted comments

BTW, if this helps, I ended up dropping paranoid-core-0.3.2.jar (downloaded from https://mvnrepository.com/artifact/io.michaelrocks/paranoid-core/0.3.2) into the libs folder in my AAR library project. That way, it’s treated as a local dependency, so it’s embedded and obfuscated into the AAR - so that the consumer of my AAR doesn’t need to be “paranoid” 😃

@AndroidDeveloperLB The library doesn’t fully support obfuscation of AARs at the moment because of the issue @valeriyo mentioned above. Probably it can be supported but I don’t like the idea of adding helper classes to the AAR because it will lead to possible class duplication in the resulting APK, which is a worse and harder to fix problem. So if you need to build an obfuscated AAR right now it would be better to to it manually by applying Paranoid, adding it’s dependencies right into the AAR file, and then applying R8.

I would like to fix this issue but I have no idea how to do that in scope of this library.