直接运行即可

- 发布:2024-08-29 20:51
- 更新:2024-08-29 20:51
- 阅读:228
【报Bug】 Error: method not found:[uts.sdk.modules.shieldAudioManager.IndexKt-checkRarinModeByJs]
产品分类: uniapp/App
PC开发环境操作系统: Windows
PC开发环境操作系统版本号: win11
HBuilderX类型: 正式
HBuilderX版本号: 4.24
手机系统: Android
手机系统版本号: Android 14
手机厂商: 小米
手机机型: 红米note12 turbe
页面类型: vue
vue版本: vue3
打包方式: 云端
项目创建方式: HBuilderX
操作步骤:
预期结果:
控制台报错Error: method not found:[uts.sdk.modules.shieldAudioManager.IndexKt-checkRarinModeByJs]
控制台报错Error: method not found:[uts.sdk.modules.shieldAudioManager.IndexKt-checkRarinModeByJs]
实际结果:
返回Number类型数值
返回Number类型数值
bug描述:
uts插件,使用报错Error: method not found:[uts.sdk.modules.shieldAudioManager.IndexKt-checkRarinModeByJs]
export const checkRarinMode : checkRarinMode = function () : Number {
const context = UTSAndroid.getAppContext();
const audioManager = context.getSystemService(Context.AUDIO_SERVICE) as AudioManager;
const mode = audioManager.getRingerMode()
console.log("模式", mode);
return mode
}
<script setup>
import {
checkRarinMode
} from '@/uni_modules/shield-AudioManager';
checkRarinMode()
</script>