Facebook SDK 从8.2.0升级到12.2.0后编译报错问题

将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.

经过排查和搜索相关信息后发现将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)
以上只是可能性的一种,如无法解决报错,请自行排查解决

你可能感兴趣的:(Facebook SDK 从8.2.0升级到12.2.0后编译报错问题)