將facebook sdk version從8.2.0升級(jí)到12.2.0后報(bào)錯(cuò)如下:
/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)過(guò)排查和搜索相關(guān)信息后發(fā)現(xiàn)將kotlin_version 升級(jí)到 1.4.32及以上版本即可
buildscript {
ext.kotlin_version = "1.4.32"
...
dependencies {
...
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
}
}
如果升級(jí)后遇到如下報(bào)錯(cuò)
> A failure occurred while executing org.jetbrains.kotlin.gradle.internal.KaptExecution
> java.lang.reflect.InvocationTargetException (no error message)
可以參考這里kotlin_version升級(jí)到1.4.32報(bào)錯(cuò)問(wèn)題 - 簡(jiǎn)書 (jianshu.com)
以上只是可能性的一種,如無(wú)法解決報(bào)錯(cuò),請(qǐng)自行排查解決