將facebook sdk version從8.2.0升級到12.2.0后報錯如下:
/Users/develop/.gradle/caches/transforms-3/1d72f8a443b793c4e767ce18b514f44b/transformed/jetified-facebook-core-12.2.0-api.jar!
/META-INF/facebook-core_release.kotlin_module: Module was compiled with an incompatible version of Kotlin.
The binary version of its metadata is 1.5.1, expected version is 1.1.15.
經(jīng)過排查和搜索相關信息后發(fā)現(xiàn)將kotlin_version 升級到 1.4.32及以上版本即可
buildscript {
ext.kotlin_version = "1.4.32"
...
dependencies {
...
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
如果升級后遇到如下報錯
> A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptExecution
> java.lang.reflect.InvocationTargetException (no error message)
可以參考這里kotlin_version升級到1.4.32報錯問題 - 簡書 (jianshu.com)
以上只是可能性的一種愧哟,如無法解決報錯底洗,請自行排查解決