MichaelRocks / paranoid

String obfuscator for Android applications.
Apache License 2.0
673 stars 79 forks source link

Compilation Error Execution failed for task #49

Closed JRTStudio closed 3 years ago

JRTStudio commented 3 years ago

I'm unable to compile with version 0.3.3. I get the following error message.

Execution failed for task ':Tools:transformClassesWithParanoidForMyProjectDebug'.

'void kotlin.jvm.internal.MutablePropertyReference1Impl.(java.lang.Class, java.lang.String, java.lang.String, int)'

On subsequent compiles I get the following variation. Execution failed for task ':Tools:transformClassesWithParanoidForMyProjectDebug'.

Could not initialize class io.michaelrocks.paranoid.grip.ClassesQueryBuilder

I have added Kotlin to my project and used the same version as paranoid (1.4.31). I don't know what else I need to do/configure.

MichaelRocks commented 3 years ago

Could you check please if the version 0.3.2 works?

JRTStudio commented 3 years ago

It does.

MichaelRocks commented 3 years ago

What version of Kotlin and Gradle do you use?

bassil-altamimi commented 3 years ago

I'm not using Kotlin, it's a completely Android - Java project, V0.3.2 was working fine and I downgraded my project.

MichaelRocks commented 3 years ago

@bassil-altamimi And what's the Gradle version? Could you please try and build the project with Gradle 6.8 or 7.0?

bassil-altamimi commented 3 years ago

@MichaelRocks I was using Gradle 6.5, I just upgraded to Gradle 6.8 and it works as expected with V0.3.3

MichaelRocks commented 3 years ago

So the issue is that Gradle 6.5 uses Kotlin 1.3 and the Paranoid plugin is compiled with Kotlin 1.4. Unfortunately, these two Kotlin versions seem to be binary incompatible. Therefore, you can either upgrade Gradle to 6.8 or later, or downgrade Paranoid to 0.3.2.

bassil-altamimi commented 3 years ago

correct