android - 无法在 android 模拟器上运行颤振计步器插件
问题描述
背景
我是新手,需要实现一个计步器。我找到了用于颤振的计步器插件,但无法运行示例代码。我正在使用视觉工作室代码和安卓工作室。我收到以下错误。
错误
E/flutter (11300): [ERROR:flutter/lib/ui/ui_dart_state.cc(166)] Unhandled Exception: PlatformException(1, StepDetection not available, StepDetection is not available on this device)
I/flutter (11300): ERROR: StepCount not available
我已按照文档的说明在我的 androidmanifest 中添加了以下行:
<uses-permission android:name="android.permission.ACTIVITY_RECOGNITION/>
任何想法为什么这不起作用?不能在安卓模拟器上测试计步器应用吗?我已经在像素 2 和像素 3 上进行了测试。
我有一部 Iphone,我正在使用 Windows 计算机,所以我无法在物理设备上对其进行测试。
解决方案
推荐阅读
- azure - Azure Logic App 从 Azure 表存储中删除实体的设置
- java - 将字符串拆分为列表
- php - Phpspreadsheet - 内存耗尽
- flutter - 具有自定义形状的颤振按钮 - (三角形)
- python - 数据集生成器的问题
- java - 将 JUnit TemporaryFolder 与 SpringBoot 配置属性一起使用
- java - 无法调用派生内部类的实例方法
- django - 'ProjectFormFormSet' 对象没有属性 'request'
- html - 如何将 ::before 和 ::after 定位在父级之上并彼此相邻
- flutter - 如何在 Flutter 应用中创建响应式网格?