flutter Execution failed for task ‘:audioplayers:compileReleaseKotlin‘.

flutter Execution failed for task ‘:audioplayers:compileReleaseKotlin’.

错误内容

e: Incompatible classes were found in dependencies. Remove them from the classpath or use '-Xskip-metadata-version-check' to suppress errors
e: /Users/jiangyiwei/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib-common/1.5.10/6b84d926e28493be69daf673e40076f89492ef7/kotlin-stdlib-common-1.5.10.jar!/META-INF/kotlin-stdlib-common.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.
e: /Users/jiangyiwei/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.5.10/da6a904b132f0402fa4d79169a3c1770598d4702/kotlin-stdlib-1.5.10.jar!/META-INF/kotlin-stdlib.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.
e: /Users/jiangyiwei/.gradle/caches/transforms-2/files-2.1/9ee29e6661ec455e868f0e7709336b78/core-ktx-1.6.0-beta02/jars/classes.jar!/META-INF/core-ktx_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.
e: /Users/jiangyiwei/Desktop/flutter2.0.0/.pub-cache/hosted/pub.dartlang.org/audioplayers-0.17.4/android/src/main/kotlin/xyz/luan/audioplayers/AudioplayersPlugin.kt: (14, 25): Class 'kotlin.contracts.ExperimentalContracts' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.15.
The class is loaded from /Users/jiangyiwei/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.5.10/da6a904b132f0402fa4d79169a3c1770598d4702/kotlin-stdlib-1.5.10.jar!/kotlin/contracts/ExperimentalContracts.class
e: /Users/jiangyiwei/Desktop/flutter2.0.0/.pub-cache/hosted/pub.dartlang.org/audioplayers-0.17.4/android/src/main/kotlin/xyz/luan/audioplayers/AudioplayersPlugin.kt: (15, 25): Unresolved reference: contract
e: /Users/jiangyiwei/Desktop/flutter2.0.0/.pub-cache/hosted/pub.dartlang.org/audioplayers-0.17.4/android/src/main/kotlin/xyz/luan/audioplayers/AudioplayersPlugin.kt: (21, 32): Unresolved reference: mutableMapOf
e: /Users/jiangyiwei/Desktop/flutter2.0.0/.pub-cache/hosted/pub.dartlang.org/audioplayers-0.17.4/android/src/main/kotlin/xyz/luan/audioplayers/AudioplayersPlugin.kt: (28, 9): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.15.
The class is loaded from /Users/jiangyiwei/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.5.10/da6a904b132f0402fa4d79169a3c1770598d4702/kotlin-stdlib-1.5.10.jar!/kotlin/Unit.class
e: /Users/jiangyiwei/Desktop/flutter2.0.0/.pub-cache/hosted/pub.dartlang.org/audioplayers-0.17.4/android/src/main/kotlin/xyz/luan/audioplayers/AudioplayersPlugin.kt: (29, 9): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.15.
The class is loaded from /Users/jiangyiwei/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.5.10/da6a904b132f0402fa4d79169a3c1770598d4702/kotlin-stdlib-1.5.10.jar!/kotlin/Unit.class
e: /Users/jiangyiwei/Desktop/flutter2.0.0/.pub-cache/hosted/pub.dartlang.org/audioplayers-0.17.4/android/src/main/kotlin/xyz/luan/audioplayers/AudioplayersPlugin.kt: (30, 9): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.15.
The class is loaded from /Users/jiangyiwei/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.5.10/da6a904b132f0402fa4d79169a3c1770598d4702/kotlin-stdlib-1.5.10.jar!/kotlin/Unit.class
e: /Users/jiangyiwei/Desktop/flutter2.0.0/.pub-cache/hosted/pub.dartlang.org/audioplayers-0.17.4/android/src/main/kotlin/xyz/luan/audioplayers/AudioplayersPlugin.kt: (31, 17): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.15.
The class is loaded from /Users/jiangyiwei/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.5.10/da6a904b132f0402fa4d79169a3c1770598d4702/kotlin-stdlib-1.5.10.jar!/kotlin/Unit.class
e: /Users/jiangyiwei/Desktop/flutter2.0.0/.pub-cache/hosted/pub.dartlang.org/audioplayers-0.17.4/android/src/main/kotlin/xyz/luan/audioplayers/AudioplayersPlugin.kt: (37, 13): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.15.
The class is loaded from /Users/jiangyiwei/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.5.10/da6a904b132f0402fa4d79169a3c1770598d4702/kotlin-stdlib-1.5.10.jar!/kotlin/Unit.class
e: /Users/jiangyiwei/Desktop/flutter2.0.0/.pub-cache/hosted/pub.dartlang.org/audioplayers-0.17.4/android/src/main/kotlin/xyz/luan/audioplayers/AudioplayersPlugin.kt: (39, 20): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.15.
The class is loaded from /Users/jiangyiwei/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.5.10/da6a904b132f0402fa4d79169a3c1770598d4702/kotlin-stdlib-1.5.10.jar!/kotlin/Unit.class
e: /Users/jiangyiwei/Desktop/flutter2.0.0/.pub-cache/hosted/pub.dartlang.org/audioplayers-0.17.4/android/src/main/kotlin/xyz/luan/audioplayers/AudioplayersPlugin.kt: (40, 22): Class 'kotlin.Unit' was compiled with an incompatible version of Kotlin. The binary version of its metadata is 1.5.1, expected version is 1.1.15.
The class is loaded from /Users/jiangyiwei/.gradle/caches/modules-2/files-2.1/org.jetbrains.kotlin/kotlin-stdlib/1.5.10/da6a904b132f0402fa4d79169a3c1770598d4702/kotlin-stdlib-1.5.10.jar!/kotlin/Unit.class

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':audioplayers:compileReleaseKotlin'.
> Compilation error. See log for more details

解决方法
android->build.gradle文件,修改ext.kotlin_version = ‘1.5.10’

上一篇:YDOOK: C语言 MDK5:main.c(57): warning: #223-D: function “strlen“ declared implicitly 警告处理


下一篇:typeof所输出的数据类型