我在我的应用程序中使用 Flutter 音频播放器包来播放来自 Google Cloud 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 …Run Code Online (Sandbox Code Playgroud) 在我的 ios 应用程序中,我使用flutter tts。它在 Android 上按预期工作,但在 ios 上音量非常低,因为音频来自耳机(而不是扬声器)。因此,音量非常非常低。如何将音频输出切换到扬声器?欢迎任何建议。提前致谢。
这是我的代码:
await flutterTts.setSpeechRate(Platform.android == true ? 0.97 : 0.53);
await flutterTts.speak("I am a Flutter developer");
Run Code Online (Sandbox Code Playgroud) 您好,我正在我的 flutter 应用程序中使用 PageView。我想检测用户何时过度滚动并超出页面。我如何实现它
我的PageView的代码:
PageView(
controller: _controller,
children: widget.imagePaths,
),
Run Code Online (Sandbox Code Playgroud) 我想将 Siri 集成到我的 iOS 版 flutter 应用程序中。当用户提出特定问题时,Siri 必须从应用程序获取输出并执行应用程序中的函数。我怎样才能实现这个目标?任何帮助将不胜感激。