gpt4 book ai didi

Flutter - 由于 "Audioplayers"包而无法构建 APK

转载 作者:行者123 更新时间:2023-12-03 18:39:31 27 4
gpt4 key购买 nike

我在我的应用程序中使用包 flutter 音频播放器来播放来自谷歌云 tts 的音频。
它在 iOS 模拟器上运行良好,但是当我构建 apk 时出现以下错误:

e: /Users/josuha/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/audioplayers-0.17.1/android/src/main/kotlin/xyz/luan/audioplayers/AudioplayersPlugin.kt: (181, 52): Expecting a parameter declaration
e: /Users/joshua/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/audioplayers-0.17.1/android/src/main/kotlin/xyz/luan/audioplayers/AudioplayersPlugin.kt: (231, 38): Expecting an argument
e: /Users/joshua/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/audioplayers-0.17.1/android/src/main/kotlin/xyz/luan/audioplayers/ByteDataSource.kt: (8, 37): Expecting a parameter declaration
e: /Users/joshua/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/audioplayers-0.17.1/android/src/main/kotlin/xyz/luan/audioplayers/WrappedMediaPlayer.kt: (10, 39): Expecting a parameter declaration
e: /Users/joshua/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/audioplayers-0.17.1/android/src/main/kotlin/xyz/luan/audioplayers/WrappedSoundPool.kt: (168, 32): Expecting a parameter declaration
e: /Users/joshua/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/audioplayers-0.17.1/android/src/main/kotlin/xyz/luan/audioplayers/WrappedSoundPool.kt: (205, 26): Expecting an argument
e: /Users/joshua/Documents/flutter/.pub-cache/hosted/pub.dartlang.org/audioplayers-0.17.1/android/src/main/kotlin/xyz/luan/audioplayers/WrappedSoundPool.kt: (46, 77): Type inference failed. Expected type mismatch: inferred type is List<???> but MutableList<WrappedSoundPool> was expected

FAILURE: Build failed with an exception.

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

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output. Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 7s
Running Gradle task 'assembleRelease'...
Running Gradle task 'assembleRelease'... Done 8.7s
Gradle task assembleRelease failed with exit code 1
在此先感谢您的帮助。

最佳答案

据我所知,它是一个 bug
与所有错误一样,您可以等待修复或降级软件包,直到找到仍然有效的版本。
或者,您可以自己挖掘 code ,修复它并打开 pull request

关于Flutter - 由于 "Audioplayers"包而无法构建 APK,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/65540471/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com