Android编译时的各种问题
Android 编译时的各种问题
Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0
报错:
/Users/10069683/.gradle/caches/transforms-3/638bdc2f3e1ec12bf62601ed14331206/transformed/jetified-firebase-analytics-ktx-21.2.2-api.jar!/META-INF/java.com.google.android.libraries.firebase.firebase_analytics_ktx_granule.kotlin_module: Module was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.8.0, expected version is 1.6.0.
分析:
当前 kotlin_version = '1.6.0',在引入了 Firebase Remote Config 后,编译报错了
// Import the BoM for the Firebase platform
implementation platform('com.google.firebase:firebase-bom:32.0.0')
// Add the dependencies for the Remote Config and Analytics libraries
// When using the BoM, you don't specify versions in Firebase library dependencies
implementation 'com.google.firebase:firebase-config-ktx'
implementation 'com.google.firebase:firebase-analytics-ktx'
解决:
改 kotlin_version = '1.7.0',kotlin compiler 版本:
