最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

android - (NOBRIDGE) ERROR Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'HealthConnect' could not

programmeradmin4浏览0评论

I'm working on a React Native Expo app and encountering the following error: Invariant Violation: TurboModuleRegistry.getEnforcing(...): 'HealthConnect' could not be found. Verify that a module by this name is registered in the native binary. Steps to reproduce:

  1. I created the expo native project
  2. I followed the documentation of the Git repositories.:
  3. The app fails to build and crashes when trying to interact with the HealthConnect module.

Additional Info:

  • react-native: 0.76.7
  • react-native health connect: 3.3.2
  • android: 13
{
  "expo": {
    "name": "NDMobileApp",
    "slug": "NDMobileApp",
    "version": "1.0.0",
    "orientation": "portrait",
    "icon": "./assets/icon.png",
    "userInterfaceStyle": "light",
    "newArchEnabled": true,
    "splash": {
      "image": "./assets/splash-icon.png",
      "resizeMode": "contain",
      "backgroundColor": "#ffffff"
    },
    "ios": {
      "supportsTablet": true
    },
    "android": {
      "adaptiveIcon": {
        "foregroundImage": "./assets/adaptive-icon.png",
        "backgroundColor": "#ffffff"
      },
      "package": "com.anonymous.NDMobileApp",
      "permissions": [
        "android.permission.health.READ_STEPS"
      ]
     
    },
    "web": {
      "favicon": "./assets/favicon.png"
    },
    "plugins": [
      "./androidManifestPlugin.js",
     "expo-health-connect",
     [
      "expo-build-properties",
      {
        "android": {
          "compileSdkVersion": 34,
          "targetSdkVersion": 34,
          "buildToolsVersion": "34.0.0",
          "minSdkVersion": 26
        }
      }
    ]
    ]
  }
}

Question: Is there a specific step I'm missing for integrating HealthConnect in an Expo project? Are there any configurations I need to verify to ensure that the native module is properly registered? Has anyone else encountered this issue when using HealthConnect with React Native and Expo?

I want to properly initialize HealthConnect and retrieve fitness data in my app.

与本文相关的文章

发布评论

评论列表(0)

  1. 暂无评论