MichaelRocks/DataBindingCompat

error on apply plugin

xellDart opened this issue · 13 comments

i have this error
Error:Could not initialize class io.michaelrocks.databindingcompat.PluginVersion

Could you run your build with --stacktrace and add the stacktrace to the issue?

@xperiafan13-rom Any updates?

Im sorry, i have this msg:
Error:Unable to find method 'kotlin.text.StringsKt.toIntOrNull(Ljava/lang/String;)Ljava/lang/Integer;'.
Possible causes for this unexpected error include:

In the case of corrupt Gradle processes, you can also try closing the IDE and then killing all Java processes.

If i re-downlaod dependencies i have:
Error:Could not initialize class io.michaelrocks.databindingcompat.PluginVersion

Now im alppy the flag on compiler... but same msg

@xperiafan13-rom I cannot understand why this problems occurs without logs. Can you run the following script

./gradlew assemble --console plain --debug --stacktrace > build.log 2>&1 

and attach build.log to this issue?

@xperiafan13-rom And what version of Android Gradle plugin are you using?

@xperiafan13-rom Seems you're using a very old version of Android Gradle plugin. I tried and fix my plugin, so I hope it'll work fine now.

Hello @MichaelRocks, I'm having the same issue when I try to sync the project after adding the library. Attached logs:

filtered.log

@modislaszlox2 What's the version of Android Gradle plugin you're using?

@modislaszlox2 Thank you. Seems the reason of this issue isn't what I expected. But it's very difficult for me to fix this bug with the information I have. It would be nice if you could build your project with --stacktrace flag and send me a full stacktrace. And it would be even better if you show me your .gradle files.

@MichaelRocks Issue can be reproduced easily with an empty project.
build.log
build.zip
app-build.zip

@modislaszlox2 Yep, I managed to reproduce it with your .gradle files. Unfortunately, I don't quite understand what happens there. Seems Kotlin 1.0.x instead of 1.1.x is used at runtime for some reason. I'll try to fix it but everything should work fine with the new Android Gradle plugin 3.0.0.

@MichaelRocks After updating to Android Studio 3.0 and 3.0.0 gradle plugin the library works correctly. Because the gradle plugin 3.0.0 is officially released from my perspective the issue can be closed.