Facing issue in installation #207
mbq-shanmukh-jerripothlla
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
After installing react-native-health-connect in my project .
when I ran react-native run-android I am facing below error
I am new to react native I tried to resolve it. any idea how to resolve it
Some dependencies
"react": "19.0.0",
"react-native": "0.78.0",
"react-native-health-connect": "^3.3.2",
build.gradle
buildscript {
ext {
buildToolsVersion = "35.0.0"
minSdkVersion = 26
compileSdkVersion = 34
targetSdkVersion = 34
ndkVersion = "27.1.12297006"
kotlinVersion = "1.8.22"
}
repositories {
google()
mavenCentral()
}
dependencies {
classpath("com.android.tools.build:gradle:8.1.2")
classpath("com.facebook.react:react-native-gradle-plugin")
classpath("org.jetbrains.kotlin:kotlin-gradle-plugin:1.8.22")
}
}
apply plugin: "com.facebook.react.rootproject"
ERROR
e: file:///home/shanmukhjerripothlla/Projects/self/mbq-native-app/node_modules/react-native-health-connect/android/src/main/java/dev/matinzd/healthconnect/records/ReactHealthRecord.kt:40:46 Only safe (?.) or non-null asserted (!!.) calls are allowed on a nullable receiver of type 'com.facebook.react.bridge.ReadableMap?'.
e: file:///home/shanmukhjerripothlla/Projects/self/mbq-native-app/node_modules/react-native-health-connect/android/src/main/java/dev/matinzd/healthconnect/utils/HealthConnectUtils.kt:53:14 Argument type mismatch: actual type is 'com.facebook.react.bridge.ReadableMap?', but 'com.facebook.react.bridge.ReadableMap' was expected. FAILURE: Build failed with an exception. * What went wrong:
Beta Was this translation helpful? Give feedback.
All reactions