Android Studio报错:The binary version of its metadata is 1.5.1, expected version is 1.1.15.

Posted 舒泱

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Android Studio报错:The binary version of its metadata is 1.5.1, expected version is 1.1.15.相关的知识,希望对你有一定的参考价值。

问题:

在新建module后,运行不了,android Studio报错: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.
       

       

       

解决办法1:

        将工程的build.gradle中的ext.kotlin_version = "1.3.72"(低版本)改成ext.kotlin_version = "1.5.21"(不一定是1.5.21,最新版也行),再sync一下,重新运行就可以了。

       

       

解决办法2:

        打开你的module(我这里的module名字叫mylibrary)目录下的build.gradle,删除dependencies 内的一些行,只剩下第二个图里的对应行。重新运行就可以了。

剩下这些行:

以上是关于Android Studio报错:The binary version of its metadata is 1.5.1, expected version is 1.1.15.的主要内容,如果未能解决你的问题,请参考以下文章

android studio 打包报错:Generate Signed APK: Errors while building APK. You can find the errors in the &

错误记录Android Studio 编译报错 ( AppCompat does not support the current theme features )

错误记录Android Studio 打包 apk 文件报错 ( The destination folder does not exist or is not writeable )

错误记录Android Studio 运行报错 ( There is not enough memory to perform the requested operation. )

错误记录Android Studio 编译报错 ( The dependency contains Java 8 bytecode. Please enable desugaring by )

错误记录Android Studio 编译报错 ( The minCompileSdk (31) specified in a dependency‘s AAR metadata (META- )